Amazon interview question

Two sum, same as no.1 on leetcode