input: Write a python function to perform hill climbing optimization to minimize the total distance in a given list of integers.
  assert hill_climbing([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]  # Example where the initial solution is already optimal
  assert hill_climbing([5, 4, 3, 2, 1]) != [5, 4, 3, 2, 1]  # Example where the initial solution is not optimal
  assert hill_climbing([10, 20, 30, 40, 50]) == [10, 20, 30, 40, 50]  # Example where the initial solution is already optimal
output: def hill_climbing(arr):
      def total_distance(arr):
          return sum(abs(arr[i] - arr[i + 1]) for i in range(len(arr) - 1))
      
      current_solution = arr[:]
      current_distance = total_distance(current_solution)
      improved = True
      
      while improved:
          improved = False
          for i in range(len(current_solution) - 1):
              for j in range(i + 1, len(current_solution)):
                  new_solution = current_solution[:]
                  new_solution[i], new_solution[j] = new_solution[j], new_solution[i]
                  new_distance = total_distance(new_solution)
                  if new_distance < current_distance:
                      current_solution = new_solution
                      current_distance = new_distance
                      improved = True
                      break
              if improved:
                  break
      
      return current_solution