input: Write a python function to implement a sorting algorithm.
  assert sorting_algorithm([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == [1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]
  assert sorting_algorithm([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  assert sorting_algorithm([5, 7, 3, 8, 2, 9, 1, 6, 4]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]
output: def sorting_algorithm(arr):
      for i in range(len(arr)):
          for j in range(0, len(arr) - i - 1):
              if arr[j] > arr[j + 1]:
                  arr[j], arr[j + 1] = arr[j + 1], arr[j]
      return arr