Mini Excel from Data Structures
A spreadsheet engine built entirely on core DSA

Overview
A simplified spreadsheet engine that implements live formula evaluation the same way a real one would: a dependency graph between cells, an expression tree for parsing, and stack/queue-based evaluation — reinforcing DSA concepts through a genuinely useful build rather than a textbook exercise.
Key features
- Live formula computation across dependent cells
- Circular reference detection
- Efficient recalculation limited to affected cells only
Architecture & engineering decisions
Dependency graph between cells to detect circular references and determine recalculation order
Expression tree construction for parsing formulas, handling operator precedence structurally
Stack-based evaluation for arithmetic expressions; queue-based recalculation propagation
Linked-list-backed sparse grid representation for efficient cell storage
Product gallery
View full gallery →
Challenges & how I solved them
Detecting and reporting circular formula dependencies without infinite loops
Ran cycle detection on the dependency graph before evaluation, rejecting a formula outright if it would close a cycle.
Keeping recalculation efficient by only updating affected cells
Used topological ordering on the dependency graph so recalculation touched only cells downstream of an edit.
Lessons learned
- Building a 'toy' spreadsheet from raw DSA made topological sort and expression trees concrete in a way lecture slides never did.
Stack