Amazon interview question

3 Sum problem from LeetCode