Amazon Interview Question

Leetcode 3 sum question, almost exactly