Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. Larger values "bubble" to the end.
Worst: O(n²)
Average: O(n²)
Best: O(n) (optimized, sorted input)
Space: O(1)
Good for: educational purposes, nearly-sorted small arrays.