Design a Spreadsheet with Formulas
Hard · Low-Level Design · about 50 minutes
Asked at OpenAI, Microsoft, Google, xAI, Cohere, Mistral AI.
Design the engine of a spreadsheet. Cells hold a number or a formula such as =A1+B2*2 that refers to other cells. set(cell, value) and get(cell) must keep every dependent cell's value up to date, and setting a formula that would create a circular reference must be rejected without changing anything.