IBM Interview Question

One was a Database Query and the other was hash map question