Apple interview question

Two sum - easy leetcode question