hard

Design a Spreadsheet

Design a spreadsheet application. Include cell management, formula evaluation with cell references, dependency tracking between cells, circular dependency detection, and automatic recalculation.

Suggested time: 45 minutes

Loading the workspace...

About this problem

A spreadsheet is a deceptively complex OOD problem. On the surface, it is a grid of cells. Below the surface, it is a dependency graph engine with cycle detection, incremental recalculation, and an expression parser. Let's define the boundaries.

What your design needs to cover

  • Cells Store Values, Formulas, or Text

  • Formulas Reference Other Cells and Auto-Recalculate

  • Detect and Reject Circular Dependencies

  • Support Cell Ranges in Formulas

Key challenges the editorial covers

Learn from other designs

Related problems

Guides