Pregunta de entrevista de Amazon

very common easy leetcode question, two sum level