Bloomberg interview question

Variation of leetcode two sum