@themissingreadme

Computer science,
made visible.

Short animated lessons that show how computers really work. Start here: a real bubble sort you can step through, one line at a time.

Join Cohort 0 ↓

Bubble Sort

Compare two neighbors. Swap if the left is bigger. The biggest bar bubbles to the end.

10
Bubble Sortcomparisons 0 · swaps 0
7
9
10
8
6
4
1
5
2
3

ready: press play

0 / 90
more languages soon
1def bubble_sort(a):
2 n = len(a)
3 for p in range(n - 1):
4 swapped = False
5 for i in range(n - 1 - p):
6 if a[i] > a[i + 1]:
7 a[i], a[i + 1] = a[i + 1], a[i]
8 swapped = True
9 if not swapped:
10 break
11 return a

✓ This is the code that ran

Early access

Join Cohort 0

The first group to try the full site before anyone else. We start with algorithms and data structures, then go further into computer science.

  • Run your own code and watch every step
  • See the exact step where your logic breaks
  • Vote on what we animate next
  • Get the private link before public launch

No spam. Unsubscribe anytime. Privacy