Library
Learn by watching it work
75 ready-made visuals, from adding numbers and fractions to sorting, graphs, projectiles and molecules. Open one, step through it, then change the numbers and watch it again. No account needed. Sorting and searching entries can run side by side.
75 of 75 visuals shown
Sorting
7- DSA · PythonO(n²)Bubble sort
Neighbours are compared and swapped until the largest values bubble to the end.
- sorting
- swap
- comparison
- beginner
Related:Insertion sort,Selection sort
- DSA · PythonO(n²)Insertion sort
Take the next value and slide it left into the sorted part, like sorting cards in your hand.
- sorting
- shift
- comparison
- beginner
Related:Bubble sort,Selection sort
- DSA · PythonO(n²)Selection sort
Find the smallest value in the unsorted part and swap it into place, one position at a time.
- sorting
- minimum
- swap
- beginner
Related:Bubble sort,Insertion sort
- DSA · PythonO(n log n)Merge sort
Split the list in halves, sort each half, then merge the two sorted halves.
- sorting
- divide and conquer
- recursion
- merge
Related:Quick sort,Heap sort
- DSA · PythonO(n log n) averageQuick sort
Pick a pivot, move smaller values to its left and bigger to its right, then sort each side.
- sorting
- divide and conquer
- pivot
- partition
Related:Merge sort,Heap sort
- DSA · PythonO(n log n)Heap sort
Turn the list into a max-heap, then repeatedly move the largest value to the end.
- sorting
- heap
- sift down
- in place
Related:Min-heap: push and pop,Quick sort
- DSA · PythonO(n + k)Counting sort
Count how many times each value appears, then write the values back out in order.
- sorting
- counting
- linear time
- no comparisons
Related:Bubble sort,Merge sort
Searching
2- DSA · PythonO(n)Linear search
Check each value from left to right until the target turns up.
- searching
- scan
- beginner
Related:Binary search
- DSA · PythonO(log n)Binary search
On a sorted list, look at the middle and throw away the half that cannot hold the target.
- searching
- sorted
- halving
- logarithmic
Related:Linear search
Data structures
11- DSA · PythonO(n)Stack: balanced brackets
Push every opening bracket; each closing bracket must match the one on top.
- stack
- push
- pop
- brackets
Related:Queue: hot potato,Tower of Hanoi
- DSA · PythonO(n · k)Queue: hot potato
Players pass a potato around a queue; after every k passes the holder is out.
- queue
- deque
- FIFO
- simulation
- DSA · PythonO(n)Reverse a linked list
Walk the list once, turning every arrow around with three pointers: prev, curr and next.
- linked list
- pointers
- reverse
- in place
- DSA · PythonO(n)Insert into a linked list
Find the node to insert after, then splice a new node in by re-pointing two arrows.
- linked list
- insert
- pointers
- DSA · PythonO(n)Delete from a linked list
Find the node before the target and point it past the target, which drops out of the chain.
- linked list
- delete
- pointers
- DSA · PythonO(h)Binary search tree: insert
Each key goes left if it is smaller than the node, right if bigger, until it finds an empty spot.
- tree
- BST
- insert
- recursion
Related:Binary search tree: search,Binary search tree: in-order traversal
- DSA · PythonO(h)Binary search tree: search
Compare with the node and go left or right — one path from the root, never the whole tree.
- tree
- BST
- search
- recursion
- DSA · PythonO(n)Binary search tree: in-order traversal
Visit left subtree, the node, then right subtree — which reads the keys out in sorted order.
- tree
- BST
- traversal
- recursion
- DSA · PythonO(log n) per push or popMin-heap: push and pop
Push values into an array-backed heap, then pop the two smallest — watch them sift up and down.
- heap
- priority queue
- sift up
- sift down
Related:Heap sort,Dijkstra's shortest paths
- DSA · PythonO(n)Hash map: two sum
Find two numbers that add to a target by remembering every number seen so far in a map.
- hash map
- dictionary
- two sum
- lookup
Related:Linear search,Trie: insert words
- DSA · PythonO(L) per wordTrie: insert words
Each letter is a step down a tree of nested maps; words that share a prefix share a path.
- trie
- prefix tree
- strings
- dictionary
Graphs
5- DSA · PythonO(V + E)Breadth-first search
Explore a graph in waves: all neighbours of the start first, then their neighbours, using a queue.
- graph
- BFS
- queue
- shortest path
- DSA · PythonO(V + E)Depth-first search
Go as deep as possible along one path, then back up and try the next unvisited neighbour.
- graph
- DFS
- recursion
- stack
- DSA · PythonO((V + E) log V)Dijkstra's shortest paths
From the start, always settle the nearest unsettled node next, relaxing the edges out of it.
- graph
- shortest path
- weights
- heap
- DSA · PythonO(V + E)Topological sort
Order tasks so every arrow points forward: repeatedly take a node with no incoming edges.
- graph
- DAG
- ordering
- in-degree
- DSA · PythonO(V + E)Cycle detection (directed)
Mark nodes "visiting" while their DFS runs; reaching a "visiting" node again means a cycle.
- graph
- cycle
- DFS
- colouring
Related:Depth-first search,Topological sort
Dynamic programming
7- DSA · PythonO(n)Fibonacci with memoization
Plain recursion recomputes fib(3) again and again; a memo dictionary answers repeats instantly.
- dynamic programming
- memoization
- recursion
- fibonacci
Related:Climbing stairs,Factorial
- DSA · PythonO(n)Climbing stairs
How many ways to climb n steps taking 1 or 2 at a time? Build the table from the bottom.
- dynamic programming
- tabulation
- counting
- bottom-up
Related:Fibonacci with memoization,Coin change (fewest coins)
- DSA · PythonO(n · W)0/1 knapsack
Pick items with the most value that fit in a bag of capacity W — each item taken at most once.
- dynamic programming
- knapsack
- table
- optimisation
Related:Coin change (fewest coins),Longest common subsequence
- DSA · PythonO(m · n)Longest common subsequence
The longest sequence of letters that appears, in order, in both strings — filled cell by cell.
- dynamic programming
- strings
- table
- LCS
Related:Edit distance,0/1 knapsack
- DSA · PythonO(n²)Longest increasing subsequence
For each position, the longest rising run that ends there — built from every earlier smaller value.
- dynamic programming
- subsequence
- array
- LIS
- DSA · PythonO(amount · coins)Coin change (fewest coins)
The fewest coins that make each amount from 1 up to the target, reusing smaller answers.
- dynamic programming
- coins
- minimum
- bottom-up
Related:0/1 knapsack,Climbing stairs
- DSA · PythonO(m · n)Edit distance
The fewest inserts, deletes and replacements to turn one word into another, as a table.
- dynamic programming
- strings
- levenshtein
- table
Related:Longest common subsequence,Longest increasing subsequence
Recursion
4- DSA · PythonO(n)Factorial
n! = n × (n−1)!: calls stack up until the base case, then the answers multiply back out.
- recursion
- call stack
- base case
- beginner
- DSA · PythonO(log n)Fast exponentiation
x¹⁰ needs only 4 multiplications: square the half-power instead of multiplying ten times.
- recursion
- divide and conquer
- exponent
- squaring
Related:Factorial,Binary search
- DSA · PythonO(2ⁿ)Tower of Hanoi
Move n disks between pegs, one at a time, never a big disk on a small one — in 2ⁿ − 1 moves.
- recursion
- puzzle
- call stack
- hanoi
Related:Permutations,Stack: balanced brackets
- DSA · PythonO(n · n!)Permutations
Every ordering of a list: fix one item first, then permute the rest.
- recursion
- backtracking
- combinatorics
- permutations
Related:Tower of Hanoi,Depth-first search
Arithmetic
6- Maths · Exact arithmeticAdding three numbers
20 + 40 + 60 as hops on a number line, place-value blocks and column addition, exactly.
- addition
- number line
- place value
- column addition
- Maths · Exact arithmeticSubtraction with borrowing
500 − 275: hop back along the number line and borrow across the columns.
- subtraction
- borrowing
- column subtraction
Related:Adding three numbers,Long division
- Maths · Exact arithmeticLong division
156 ÷ 12 worked digit by digit: divide, multiply, subtract, bring down.
- division
- long division
- remainder
Related:Adding fractions with different denominators,Adding three numbers
- Maths · Exact arithmeticAdding fractions with different denominators
3/4 + 1/6: fraction bars are cut into twelfths so the pieces can be counted together.
- fractions
- common denominator
- LCD
Related:Fraction bars: ½ + ⅓,Long division
- Maths · Exact arithmeticOrder of operations (BODMAS)
(3 + 4) × 2 − 5 as an expression tree that evaluates brackets first, then ×, then −.
- BODMAS
- brackets
- expression tree
- order of operations
- Maths · Interactive modelFraction bars: ½ + ⅓
Two fractions drawn as bars, re-cut to a common denominator and added. Change the numbers.
- fractions
- fraction bars
- template
Algebra & geometry
10- Maths · Interactive modelSolve 2x + 3 = 11
A balance scale: the same operation happens on both sides until x stands alone.
- algebra
- linear equation
- balance scale
- solve for x
- Maths · Interactive modelPythagoras' theorem
Squares on each side of a 3-4-5 triangle show why a² + b² = c².
- geometry
- right triangle
- hypotenuse
- squares
Related:Area of a circle,Graph of y = x² − 4
- Maths · Interactive modelArea of a circle
A circle is cut into wedges and unrolled into a near-rectangle: A = πr².
- geometry
- circle
- area
- pi
Related:Pythagoras' theorem
- Maths · Interactive modelGraph of y = x² − 4
The parabola is plotted point by point; its roots, intercept and vertex are marked.
- graph
- parabola
- roots
- vertex
Related:Solve 2x + 3 = 11,Projectile motion
- Maths · Interactive modelVolume and surface area of a cylinder
A cylinder of radius 7 cm and height 10 cm in 3D: the volume stacked up from its base, and the curved surface unrolled into a rectangle.
- geometry
- solids
- volume
- surface area
- Maths · Interactive modelVolume and surface area of a cone
A cone of radius 3 cm and height 4 cm: the slant height by Pythagoras, one third of the matching cylinder, and the curved surface unrolled into a sector.
- geometry
- solids
- cone
- slant height
Related:Volume and surface area of a cylinder,Pythagoras' theorem
- Maths · Interactive modelVolume and surface area of a sphere
Archimedes' results in 3D: a sphere fills two thirds of the cylinder around it, and its surface covers exactly four great circles.
- geometry
- solids
- sphere
- Archimedes
Related:Volume and surface area of a cylinder,Area of a circle
- Maths · Interactive modelCross product of two vectors
a × b by the determinant, its length as the area of the parallelogram a and b span, and its direction by the right-hand rule.
- vectors
- cross product
- right-hand rule
- determinant
Related:Dot product and the angle between vectors,Torque as a cross product
- Maths · Interactive modelDot product and the angle between vectors
(1, 2, 3) · (4, 5, 6) = 32: multiply matching components, find the angle between the vectors, and see the dot product as a length times a shadow.
- vectors
- dot product
- angle
- projection
Related:Cross product of two vectors,Distance and section formula in 3D
- Maths · Interactive modelDistance and section formula in 3D
Points A(1, 2, 3) and B(4, 6, 3) in space: the distance from the box between them, the point dividing AB in the ratio 2 : 1, and the direction cosines.
- coordinate geometry
- distance
- section formula
- direction cosines
Related:Dot product and the angle between vectors,Pythagoras' theorem
Mechanics
8- Physics · Interactive modelProjectile motion
A ball launched at 20 m/s and 30°: its path, velocity components, apex and range, with energy bars.
- projectile
- gravity
- vectors
- energy
Related:Free fall,Uniform circular motion
- Physics · Interactive modelFree fall
Drop from 20 m: position, speed and energy every instant until impact.
- free fall
- gravity
- velocity
- energy
Related:Projectile motion,Simple pendulum
- Physics · Interactive modelSimple pendulum
A 1 m pendulum released at 20°: the swing, its period and the trade between potential and kinetic energy.
- pendulum
- period
- oscillation
- energy
- Physics · Interactive modelMass on a spring (Hooke's law)
A 2 kg mass on a 50 N/m spring pulled 0.2 m: F = −kx, the period and the energy exchange.
- spring
- hooke
- oscillation
- simple harmonic motion
- Physics · Interactive modelBlock on an inclined plane
A 5 kg block on a 30° slope with friction 0.2: the forces, and whether it slides.
- incline
- friction
- forces
- free body diagram
- Physics · Interactive modelUniform circular motion
An object at 4 m/s on a 2 m circle: the velocity and centripetal acceleration vectors, and the period.
- circular motion
- centripetal
- velocity
- acceleration
- Physics · Interactive modelElastic collision in one dimension
Two carts meet head-on; momentum and kinetic energy are tallied before and after.
- collision
- momentum
- elastic
- conservation
- Physics · Interactive modelTorque as a cross product
A force on a 0.3 m lever: τ = r × F component by component, why only the part of F across the lever turns it, and which way τ points.
- torque
- cross product
- moment arm
- right-hand rule
Related:Cross product of two vectors,Uniform circular motion
Electricity & optics
6- Physics · Interactive modelSeries circuit (Ohm's law)
A 12 V battery with 2 Ω and 4 Ω in series: one current, and the voltage drop across each resistor.
- circuit
- series
- ohm
- current
Related:Parallel circuit (Ohm's law)
- Physics · Interactive modelParallel circuit (Ohm's law)
A 12 V battery with 3 Ω and 6 Ω in parallel: branch currents and the equivalent resistance.
- circuit
- parallel
- ohm
- equivalent resistance
Related:Series circuit (Ohm's law)
- Physics · Interactive modelThin lens ray diagram
An object 25 cm from a 10 cm converging lens: the principal rays draw themselves and meet at the image.
- optics
- lens
- ray diagram
- focal length
Related:Refraction (Snell's law)
- Physics · Interactive modelRefraction (Snell's law)
A ray enters glass (n = 1.5) at 40°: how much it bends, and when it would reflect instead.
- optics
- refraction
- snell
- refractive index
Related:Thin lens ray diagram
- Physics · Interactive modelCharged particle in a magnetic field
A proton entering a 0.1 T field at 60°: the force qv × B bends it into a helix, with its radius, period and pitch worked out as it moves.
- magnetic field
- Lorentz force
- helix
- proton
- Physics · Interactive modelElectromagnetic wave
Green light as a travelling wave: E and B at right angles and in step, B₀ = E₀/c, and one wavelength travelled every period.
- electromagnetic wave
- light
- electric field
- magnetic field
Related:Charged particle in a magnetic field,Refraction (Snell's law)
Chemistry
8- Chemistry · Interactive modelBalancing a chemical equation
Propane burning: C₃H₈ + O₂ → CO₂ + H₂O, balanced with atom counters on both sides.
- chemistry
- balance
- equation
- coefficients
- Chemistry · Interactive modelMolecule structure: ethanol
Ethanol drawn from its SMILES string, every atom and bond labelled. Try another molecule.
- chemistry
- molecule
- structure
- SMILES
Related:Balancing a chemical equation,Electron configuration of oxygen
- Chemistry · Interactive modelIdeal gas law
One mole at 273.15 K in 22.4 L: solve PV = nRT for the pressure, with particles in a box.
- chemistry
- gas
- PV=nRT
- pressure
Related:Balancing a chemical equation,Electron configuration of oxygen
- Chemistry · Interactive modelElectron configuration of oxygen
Eight electrons fill 1s, 2s and 2p in Aufbau order, drawn as an orbital-box diagram.
- chemistry
- electrons
- orbitals
- aufbau
- Chemistry · Interactive modelShape of ammonia (VSEPR)
Count the electron pairs around N, spread them to the corners of a tetrahedron and hide the lone pair: a trigonal pyramid with a 107° bond angle.
- chemistry
- VSEPR
- molecular shape
- lone pair
Related:Seesaw shape of SF₄ (VSEPR),Molecule structure: ethanol
- Chemistry · Interactive modelSeesaw shape of SF₄ (VSEPR)
Five electron pairs around sulfur; the lone pair takes a roomier place round the middle, leaving the four F atoms in a seesaw.
- chemistry
- VSEPR
- trigonal bipyramid
- seesaw
Related:Shape of ammonia (VSEPR),Electron configuration of oxygen
- Chemistry · Interactive modelFace-centred cubic unit cell (copper)
Copper's unit cell: 8 × ⅛ + 6 × ½ = 4 atoms, 12 neighbours each, the radius where atoms touch, 74% packing and a density of 8.97 g/cm³.
- chemistry
- unit cell
- fcc
- packing efficiency
- Chemistry · Interactive modelRock salt (NaCl) unit cell
Cl⁻ at the corners and faces, Na⁺ on the edges and in the centre: 4 formula units per cell, 6 : 6 coordination and the density of salt.
- chemistry
- unit cell
- ionic crystal
- coordination number
Related:Face-centred cubic unit cell (copper),Balancing a chemical equation
Biology
1- Biology · Interactive modelDNA double helix
One strand’s bases pair A–T and G–C to build the complementary strand, which runs the other way; then the ladder twists, 10 base pairs to a turn.
- DNA
- base pairing
- double helix
- complementary strand
Related:Molecule structure: ethanol