eBay Interview Question

It is the Two sum leetcode question.