<aside> <img src="/icons/home_green.svg" alt="/icons/home_green.svg" width="40px" />
</aside>
https://jennychen9827sbu.github.io/CAD281/bbsort.html
Bubble Sort is a simple sorting algorithm that compares and swaps adjacent elements until sorted.
Named because larger values "bubble up" to the end.
| š Pros | š Cons |
|---|---|
| Simple | O(n²) complexity |
| Learning tool | Inefficient at scale |
ā Best for teaching and tiny arrays.
Steps:
[64, 34, 25, 12] After sorting [12, 25, 34, 64]