Sorting
Watch sorting algorithms run one operation at a time: which values get compared, which ones swap, and how the array settles into order.
Visualisations
Side by side
| Algorithm | Best | Average | Worst | Space | Stable |
|---|---|---|---|---|---|
| Bubble Sort | O(n) | O(n²) | O(n²) | O(1) | Yes |