Amazon Interview Question

Two sum, same as no.1 on leetcode