Amazon Interview Question

Leet code 2sum and followup with 3sum