Amazon Interview Question

Leetcode medium question - Three sum