input: Write a python function to find all unique triplets that sum up to 0.
  assert find_triplets([-3, 0, 1, 2, -1, 1, -2]) == [[-3, 1, 2], [-2, 0, 2], [-1, 0, 1]]
  assert find_triplets([0, -1, 2, -3, 1]) == [[-3, 1, 2], [-1, 0, 1]]
  assert find_triplets([1, -1, -1, 0]) == [[-1, 0, 1]]
output: def find_triplets(nums):
      nums.sort()
      result = []
      for i in range(len(nums) - 2):
          if i > 0 and nums[i] == nums[i - 1]:
              continue
          left, right = i + 1, len(nums) - 1
          while left < right:
              current_sum = nums[i] + nums[left] + nums[right]
              if current_sum == 0:
                  result.append([nums[i], nums[left], nums[right]])
                  while left < right and nums[left] == nums[left + 1]:
                      left += 1
                  while left < right and nums[right] == nums[right - 1]:
                      right -= 1
                  left += 1
                  right -= 1
              elif current_sum < 0:
                  left += 1
              else:
                  right -= 1
      return result