Once you can write bubble sort, insertion sort, merge sort, and quicksort, the next question is the one that actually matters in practice: which one should you use, and why? This topic puts the four algorithms side by side and compares them on the dimensions that drive real decisions — best, average, and worst-case time complexity, extra memory usage, whether equal elements keep their original relative order (stability), and how each behaves on small inputs versus large ones.
Input order matters more than students usually expect. Insertion sort is nearly linear on data that is already almost sorted, while a naive quicksort pivot choice can degrade to O(n^2) on sorted input. Memory matters too: merge sort's O(n) auxiliary space can be a problem on large datasets, and quicksort still carries recursion stack overhead even though it sorts in place. Building a mental comparison table — algorithm, best/average/worst time, space, stable or not, typical use case — is the core skill of this topic.
As you watch the videos below, keep that table open and fill it in. Note where different sources agree on the Big O values, pay attention to any assumptions being made (such as pivot strategy or whether a linked list or array is being sorted), and watch the animated comparisons to connect the abstract complexity classes to visible differences in how many operations each algorithm performs.
This Geekific video walks through the time and space complexity of the common sorting algorithms, framing each one in Big-O terms. Based on its title and description, it summarizes a series of earlier algorithm videos and consolidates the best-case, average-case, and worst-case costs along with memory usage. Expect the kind of overview that maps directly onto a comparison table.
It is the most directly on-topic video for the Time Complexity Overview and Space Complexity Considerations subtopics, and the channel's accompanying GitHub repository lets you check implementations against the stated complexities.
Coding with Lewis gives a fast, visual tour of ten sorting algorithms, explaining the basic idea behind each one. Because it covers a wide range rather than one algorithm in depth, it is useful for seeing how bubble, insertion, merge, and quicksort relate to the broader family of sorting approaches and where each tends to be used.
Its breadth supports the side-by-side comparison and algorithm-selection subtopics, and the short, clearly explained format makes it a good orientation or review before you work through the formal analysis.
This udiprod video introduces shell sort and then runs it head-to-head against insertion sort in an animated race. The visual match-up shows how two algorithms on the same data can diverge dramatically in the number of operations they perform as input size grows.
udiprod is known for accurate, carefully built algorithm animations, and this direct comparison makes the Performance on Small vs. Large Datasets and Impact of Input Order subtopics concrete in a way that a complexity table alone cannot.
Together these videos reinforce the analytical and decision-making outcomes of the module. The Geekific overview supports MO2 by stating best, average, and worst-case time and space complexities in Big O terms for the algorithms you implement in MO1. The Coding with Lewis survey supports MO3 and MO4 by placing bubble, insertion, merge, and quicksort within a wider set of approaches and highlighting their practical niches. The udiprod head-to-head animation supports MO3 and MO4 by demonstrating visually how input size and ordering change which algorithm finishes first, which is exactly the reasoning you will apply when selecting an algorithm for a given scenario.
These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.