Bloomberg Interview Question

Variation of leetcode two sum