Question d’entretien chez Amazon

very common easy leetcode question, two sum level