Different solutions for the TwoSum problem