input: Write a python function to find all unique triplets in an array that sum up to a given target.
  assert findCombinations([2, 3, 4, 5], 9) == [[2, 3, 4]]
  assert findCombinations([1, 2, 3, 4, 5, 6], 10) == [[1, 3, 6], [2, 3, 5], [1, 4, 5]]
  assert findCombinations([0, -1, 2, -3, 1], 0) == [[0, -1, 1], [2, -3, 1]]
output: def findCombinations(arr, target):
      arr.sort()
      result = []
      for i in range(len(arr) - 2):
          if i > 0 and arr[i] == arr[i - 1]:
              continue
          left, right = i + 1, len(arr) - 1
          while left < right:
              total = arr[i] + arr[left] + arr[right]
              if total == target:
                  result.append([arr[i], arr[left], arr[right]])
                  while left < right and arr[left] == arr[left + 1]:
                      left += 1
                  while left < right and arr[right] == arr[right - 1]:
                      right -= 1
                  left += 1
                  right -= 1
              elif total < target:
                  left += 1
              else:
                  right -= 1
      return result