Amazon Interview Question

Two sum first Question on the Leet Code