add 3Sum with different time complexity