Amazon Interview Question

two sum, and three sum