Amazon interview question

Leet code 2sum and followup with 3sum