Algorithms & Data Structures

Sorting, searching, graphs, trees, recursion and dynamic programming - animated step by step.

41 modules Free, no login Updated 1 August 2026

About this track

Algorithms are the one part of computer science where an animation is obviously better than prose: the whole point is what changes on each step. This is the largest track on VizLearn, running from Big-O notation through the sorts, the searches, linked structures, trees, heaps, graphs, and the recursion-and-memoisation family.

Each page runs the algorithm at your pace, highlighting the comparison or the pointer move that just happened, with the complexity written out underneath so the cost is attached to the behaviour rather than memorised separately.

All 41 modules, in teaching order

  1. 01Big-O Notation and Time ComplexityInteractive Big-O notation lesson - compare O(1), O(log n), O(n), O(n log n), O(n squared) and O(2^n) growth curves and real operation counts.
  2. 02Python List LabIndex, slice, append and mutate Python lists interactively, and see how the underlying dynamic array grows as you go.
  3. 03Python String LabSlice, index, join and format Python strings interactively, and see how immutability shapes what each operation does.
  4. 04Python Dictionary LabInsert, look up and delete key-value pairs in a Python dictionary, and see how hashing makes each operation instant.
  5. 05Linear SearchStep through an array one element at a time and see exactly when brute-force scanning is genuinely the right choice.
  6. 06Binary SearchHalve the search space with every comparison and watch binary search locate a target in a sorted array in log n steps.
  7. 07Interpolation SearchEstimate where a value should sit instead of always splitting the middle, the way you open a phone book near the S pages.
  8. 08Fibonacci SearchDivide a sorted array using Fibonacci numbers rather than midpoints, avoiding the division binary search relies on.
  9. 09Bubble SortWatch adjacent pairs compare and swap, sending the largest value bubbling to the end on every pass through the array.
  10. 10Selection SortScan for the smallest remaining value and swap it into place, one position at a time, until the whole array is sorted.
  11. 11Insertion SortBuild a sorted section one element at a time and watch each new value shift left into the position where it belongs.
  12. 12Recursion and the Call StackInteractive recursion lesson - watch call stack frames build and unwind, see stack overflow, and compare naive against memoised Fibonacci.
  13. 13Divide and ConquerInteractive divide and conquer lesson - see the recursion tree, the master theorem, and why splitting gives O(n log n).
  14. 14Merge SortSplit an array down to single elements and watch merge sort combine sorted halves back together in n log n time.
  15. 15Quick SortPick a pivot, partition around it, then recurse, and see why the pivot choice decides whether quick sort flies or crawls.
  16. 16Counting SortSort integers without a single comparison by tallying how often each value occurs, then rebuilding the array in order.
  17. 17Radix SortInteractive radix sort lesson - LSD digit passes with stable bucketing, and why non-comparison sorting can beat O(n log n).
  18. 18Stacks (LIFO)Interactive stack data structure lesson - push and pop with LIFO order, plus a live bracket-matching demo and the call stack connection.
  19. 19Queues (FIFO)Interactive queue data structure lesson - enqueue and dequeue with FIFO order, circular queues, and why BFS needs a queue while DFS needs a stack.
  20. 20Linked ListsInteractive linked list lesson - insert and delete with animated pointer rewiring, and a direct cost comparison against arrays.
  21. 21Hash Tables and HashingInteractive hash table lesson - see keys hash into buckets, force collisions, compare chaining with open addressing, and watch load factor trigger a resize.
  22. 22Binary Search TreesInteractive binary search tree lesson - insert, search and delete with the path highlighted, in-order traversal, and how sorted input degrades a BST.
  23. 23Heaps and Priority QueuesInteractive heap lesson - sift-up and sift-down shown on both the tree and its array form, plus how a priority queue powers Dijkstra.
  24. 24Heap SortInteractive heap sort lesson - heapify then repeatedly extract the maximum, sorting in place with guaranteed O(n log n).
  25. 25Trie (Prefix Tree)Interactive trie lesson - insert words that share prefixes, search, and see autocomplete find all completions from one node.
  26. 26Union-Find (Disjoint Set)Interactive union-find lesson - union by rank and path compression shown live, with the near-constant inverse Ackermann complexity.
  27. 27Graph RepresentationsInteractive graph representation lesson - adjacency matrix versus adjacency list, with live memory and lookup cost as graph density changes.
  28. 28Breadth First SearchLearn Breadth-First Search (BFS) with a beginner-friendly interactive binary tree visualization, examples, and guided practice on VizLearn.
  29. 29Depth First SearchFollow depth-first search as far down one branch as it goes, then watch it backtrack and take the next unexplored edge.
  30. 30Cycle DetectionInteractive cycle detection lesson - Floyd's tortoise and hare on a linked list, plus finding the cycle entry point.
  31. 31Topological SortInteractive topological sort lesson - Kahn's algorithm with in-degree tracking, plus cycle detection when no valid order exists.
  32. 32Dijkstra's AlgorithmWatch Dijkstra's algorithm settle nodes in order of distance and build the shortest path across a weighted graph.
  33. 33Bellman-Ford and Negative WeightsInteractive Bellman-Ford lesson - edge relaxation over V-1 passes, negative weight handling, and negative cycle detection.
  34. 34A* Pathfinding AlgorithmWatch A* combine real distance with a heuristic estimate to reach the goal while exploring far fewer nodes than Dijkstra.
  35. 35Minimum Spanning TreeInteractive minimum spanning tree lesson - Kruskal and Prim side by side, with union-find cycle checks and the cut property explained.
  36. 36Two PointersInteractive two pointers technique - pair sum on a sorted array, palindrome check and container with most water, each stepped through.
  37. 37Sliding WindowInteractive sliding window technique - fixed and variable windows, with the running total updated by add and remove instead of recomputation.
  38. 38Greedy AlgorithmsInteractive greedy algorithm lesson - activity selection and coin change, including a case where the greedy choice provably fails.
  39. 39Backtracking Search MethodWatch backtracking commit to a path, hit a dead end, and unwind to the last decision point until the puzzle resolves.
  40. 40Dynamic ProgrammingInteractive dynamic programming lesson - memoisation versus tabulation, with the DP table filling cell by cell for Fibonacci, knapsack and edit distance.
  41. 41KMP String MatchingInteractive KMP string matching lesson - build the LPS failure table and watch the pattern shift without backing up the text pointer.

Other tracks