X interview question

Two problems where I had to use hash tables