Meta Interview Question

3sum

Interview Answer

Anonymous

Nov 22, 2018

First did brute force, let interviewer know, did it quickly. Stored array in hash-map with key as the value and value as occurrence. Nested for loop and checked if the difference of the target and the two current values existed in the hash-map. Solution was fine. He spent a long time asking questions about it.