Computer Science Visualiser

Interactive algorithm simulations for UK curriculum (GCSE & A Level).

Algorithms

Algorithm Logic

Dijkstra's: Finds the shortest path by visiting nodes with the smallest distance from the start ($g(n)$). Here, $h(n)$ is always 0.

A* Search: Uses $f(n) = g(n) + h(n)$. $g(n)$ is cost from start, $h(n)$ is heuristic estimate to target.

Node g(n) h(n) f(n)
No calculations yet...

Traversal Logic

  • Pre-order: Root → Left → Right
  • In-order: Left → Root → Right
  • Post-order: Left → Right → Root
  • Breadth-first: Level by level from top to bottom.

Complexity & Big O Notation

NotationGrowthExample
O(1)ConstantArray index access
O(log n)LogarithmicBinary Search
O(n)LinearLinear Search
O(n log n)LinearithmicMerge Sort
O(n²)PolynomialBubble Sort

Efficiency Chart

Algorithm Stages & Logic

Select an algorithm and click start to begin visualisation...