Completed TwoSum problem