input: Write a python function to implement the bubble sort algorithm.
  assert bubble_sort([2, 3, 1, 5, 9])==[1, 2, 3, 5, 9]
  assert bubble_sort([5, 2, 9, 1, 5, 6])==[1, 2, 5, 5, 6, 9]
  assert bubble_sort([4, 3, 2, 1])==[1, 2, 3, 4]
output: def bubble_sort(arr):
      n = len(arr)
      for i in range(n):
          for j in range(0, n-i-1):
              if arr[j] > arr[j+1]:
                  arr[j], arr[j+1] = arr[j+1], arr[j]
      return arr