Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

Notice that the solution set must not contain duplicate triplets.

int i = 0; if (sum <= 0) { for (i = 1; i < right - left; ++i) { if (nums[left] != nums[left + i]) { break; } } twoSum(nums, target, left + i, right); } else { for (i = 1; i < right - left; ++i) { if (nums[right] != nums[left - i]) { break; } } twoSum(nums, target, left, right - i); } } };