Your question is Implement Bubble Sort Algorithm. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a list of integers arr, implement the bubble sort algorithm to sort the list in non-decreasing order. Bubble sort works by repeatedly swapping adjacent elements if they are in the wrong order.
def bubble_sort(arr: list[int]) -> list[int]: