First Help Financial interview question

2 sum leetcode interview question