Idea · Oct 6, 2026

Build Your Own Spreadsheet Engine

A staged course project where students build a working spreadsheet: formula tokenizer and parser, dependency graph, topological recalculation, cycle detection, undo/redo and a React grid on top.

What it would do

Spreadsheets are the most widely used programming environment in the world, and building one touches parsing, graphs, incremental computation and UI. Milestone 1 is a tokenizer and recursive-descent parser for formulas (=A1+SUM(B1:B5)*2) producing an AST, tested against a provided suite. Milestone 2 adds cell references, ranges and a dependency graph, with recalculation in topological order and #CYCLE! errors reported via cycle detection. Milestone 3 makes recalculation incremental: editing one cell recomputes only its transitive dependents, and students measure the speedup on a 10,000-cell benchmark sheet. Milestone 4 adds a virtualized React grid, copy/paste with relative reference adjustment, and undo/redo via the command pattern. An optional stretch adds CSV import/export or a tiny function library (IF, VLOOKUP, AVERAGE) with type errors like #VALUE!.

Key features

  • Formula grammar with a provided test suite and a reference AST printer for self-checking
  • Dependency graph with topological recalculation and cycle detection
  • Incremental recompute benchmark that students instrument and report on
  • Relative/absolute reference rewriting on copy/paste ($A$1 vs A1)
  • Command-pattern undo/redo and a virtualized grid UI

More in Algorithms & Data Structures

Edit Graph Lab

An interactive visualizer for the diff algorithms behind git and every code-review tool: watch Myers' algorithm explore the edit graph diagonal by diagonal, compare it with patience and histogram diff, and answer simulator-checked 'what will the diff be?' questions.

BuiltAlgorithms & Data StructuresProduct for a businessOct 11, 2026

State Space Atlas

An AI-course teaching tool that computes and draws the entire state graph of small sliding-block puzzles like Klotski, so students can watch BFS, DFS, and A* explore it and see why heuristics matter.

BuiltAlgorithms & Data StructuresProduct for a businessOct 1, 2026

Chokepoint Simulator

Students build a web app that loads a real trade or transport network, lets users close a node or link, and recomputes flows, reroutes, and bottlenecks with max-flow/min-cut and shortest-path algorithms.

Algorithms & Data StructuresClass assignmentLargeSep 29, 2026

Elevator Algorithm Lab

A browser sandbox where students write an elevator dispatch policy in JavaScript, run it against instructor-authored traffic scenarios, and discover that SCAN and LOOK disk scheduling are literally elevator algorithms.

BuiltAlgorithms & Data StructuresProduct for a businessSep 29, 2026

All 27 ideas in Algorithms & Data Structures →