Bloomberg interview question

3Sum