Pregunta de entrevista de Amazon

Leetcode medium question - Three sum