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.
Example 1:
Input: arr = [5, 2, 9, 1, 5, 6]
Output: [1, 2, 5, 5, 6, 9]
Example 2:
Input: arr = [3, 0, 2, 5, -1, 4, 1]
Output: [-1, 0, 1, 2, 3, 4, 5]
1 <= arr.length <= 1000-10^3 <= arr[i] <= 10^3