UC San Diego interview question

Two sum in the leetcode