Question d’entretien chez Amazon

Leetcode 3 sum question, almost exactly