IBM interview question

2Sum problem as in leetcode