input: Write a function to find the pair of numbers in an array that sum closest to a target value.
  assert closest_sum([10, 22, 28, 29, 30, 40], 54) == [22, 30]
  assert closest_sum([1, 3, 4, 7, 10], 15) == [4, 10]
  assert closest_sum([-1, 2, 1, -4], 1) == [1, -1]
output: def closest_sum(arr, target):
      arr.sort()
      left, right = 0, len(arr) - 1
      closest_pair = []
      closest_diff = float('inf')
  
      while left < right:
          current_sum = arr[left] + arr[right]
          current_diff = abs(target - current_sum)
  
          if current_diff < closest_diff:
              closest_diff = current_diff
              closest_pair = [arr[left], arr[right]]
  
          if current_sum < target:
              left += 1
          else:
              right -= 1
  
      return closest_pair