Watch algorithms in action, predict the next step, and answer exam questions
Score 0
Round 1 / 10
Streak 0 🔥
BUBBLE SORTReady
Speed
Array state
Press Play or Next to begin stepping through Bubble Sort.
Step 0
MERGE SORTReady
Speed
Merge tree
Press Play or Next to begin stepping through Merge Sort.
Step 0
Bubble Sort · Pass 1
What does the array look like after this comparison?
🫧 Bubble Sort0
—
🔀 Merge Sort0
—
Speed
Race Result Question
Question 1 / 10
Bubble Sort
Compare adjacent pairs, left to right
If the left value > right value, swap them
After each full pass, the largest unsorted value "bubbles" to the end
Repeat until no swaps occur in a full pass (sorted!)
Merge Sort
Divide the list in half repeatedly until each sublist has 1 element
A list of 1 is already sorted
Merge pairs of sorted sublists by comparing the front elements
Repeat merging until one fully sorted list remains
Comparison Table
Bubble Sort
Merge Sort
Best case
O(n) — already sorted
O(n log n)
Worst case
O(n²)
O(n log n)
Memory
O(1) — in-place
O(n) — extra space
Stable?
Yes
Yes
Good for
Small / nearly sorted lists
Large lists
🏁
Sorting Algorithms
Sorting is arranging a list into order (usually smallest to largest). The OCR spec requires you to understand
and trace two algorithms: Bubble Sort and Merge Sort.
🫧 Bubble Sort
Compare neighbours. Swap if out of order. Repeat. Simple but slow for large lists.
🔀 Merge Sort
Split the list in half, sort each half, merge them back together. Fast but uses extra memory.
👁Watch & Learn — step through each algorithm at your own pace with
full explanations.
🎯Predict the Step — see the array, guess what happens next. Multiple
choice.
🏁Race Mode — watch both algorithms sort the same array simultaneously
and compare their steps.
📝Exam Questions — OCR-style questions about both algorithms, their
properties, and complexity.