Bloomberg Interview Question

Asked to code for two sum problem (from leetcode)