XLAB interview question

Two sums on leetcode problem