Bubble sort resources
Knowledge
- Textbook: CLRS Problem 2-2, Correctness of bubblesort (walkccc solutions)
Loop-invariant proof in the textbook's own framing; worst case Θ(n²). Use for: stating and defending the invariant.
- Lecture: Sedgewick and Wayne, Elementary Sorts (Princeton COS 226)
Insertion and selection sort with invariants. Use for: the "why insertion sort instead" comparison.
- Lecture: MIT OCW 6.100L Lecture 24, Sorting Algorithms
Bubble, selection, merge sort side by side. Use for: complexity contrast when learners ask what to use instead.
- Visualizer: VisuAlgo Sorting (NUS)
Animated bubble sort with synced pseudocode. Use for: live classroom demo.
- Visualizer: USF Comparison Sort (David Galles)
Adjustable speed and size. Use for: showing O(n²) growth visually.
- Docs: Wikipedia, Bubble sort
Early-exit pseudocode, O(n) best case, stability, ~1/5 speed of insertion sort. Use for: quick fact checks.
- Paper: Teaching the Bubble Sort Algorithm Using CS Unplugged Activities (ACM TOCE)
Documented student misconceptions (restarting after a swap, assuming max reaches end after one swap). Use for: anticipating learner confusion.
- Educator page: Owen Astrachan, Bubble Sort (Duke)
Pedagogical framing and why it survives in curricula. Use for: motivating why to teach it at all.
Wisdom (Communities)
Gaps
- Knuth TAOCP Vol. 3 (Sorting and Searching, section 5.2.2) has no open URL; cite by name.
- No existing bubble-sort teaching thread in either community; a new post would be needed.