Ennea Solutions interview question

2 sum leet code question