coded the solution and test cases for the TwoSum problem