Question d’entretien chez Amazon

Two sum problem from leetcode