Yahoo interview question

The second question was the 2SUM question from Leetcode.