Colors: Yellow = Current element, Purple = Left element, Red = Upper boundary, Blue = Comparing, Green = Sorted
Bubble Sort is a sorting algorithm that repeatedly compares adjacent elements and swaps them if they are in the wrong order, "bubbling" larger elements to the end.
How it works:
Time Complexity: O(n²) - compares adjacent pairs repeatedly