Sorting, Algorithms, Summary, Python.
Example usage arr = [64, 25, 12, 22, 11] sorted_arr = selection_sort(arr) print(sorted_arr) # Output: [11, 12, 22, 25, 64] Bubble Sort Next, we’ll implement the bubble sort algorithm, which repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.