Watch six classic sorting algorithms work on the same array — yellow = comparing, red = writing/swapping, green = in final position. The operation counts are real: this is why O(n²) and O(n log n) aren't just letters.
| algorithm | best | average | worst | space | stable |
|---|