coded the solution and test cases for the ThreeSum problem