Amazon Interview Question

3 Sum problem from LeetCode