IBM interview question

2 sum, 3 sum