X Interview Question

Two problems where I had to use hash tables