Design a Spreadsheet / Formula Engine
Problem
Design the object model for a spreadsheet with formulas referencing other cells.
Requirements
- setCell(ref, value-or-formula)
- getCell(ref) returns computed value
- recompute dependents on change
- detect circular references
What evaluators look for
- Dependency DAG + topological recompute
- Lazy vs eager evaluation
- Clean separation: parser, graph, evaluator
Extension
Support ranges (SUM(A1:A10)) and discuss how ranges affect the dependency graph.
added …