Bloomberg interview question

Variation of Leetcode Two Sum