← Airtable Interview Insights

Airtable·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Airtable software engineer interview with a system design coding problem centered on undo/redo behavior in a spreadsheet-like editor. The problem looked manageable at first glance but the edge cases around redo invalidation after a new SET operation are where things get tricky.

Questions Asked (1)

Q1

Design a data structure that supports undo and redo for a simplified spreadsheet editor, where each operation sets a single cell's value and undo/redo can be applied in bulk across k steps.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

Two stacks, one for undo history and one for redo, felt like the obvious move.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: operations are cell value assignments, undo/redo can be applied in bulk across k steps. Then propose a data structure combining a doubly linked list of operations for O(1) undo/redo and a hash map from cell ID to a stack of previous values to efficiently restore cell states. Discuss trade-offs between memory and speed, and how to handle bulk operations by moving a pointer k steps and applying inverses.

Pro tip: Mention that you would use a sentinel node to simplify edge cases in the doubly linked list, and that you would consider lazy deletion or periodic compaction to manage memory growth from the undo history.

1. Clarify requirements and constraints

Ask about the scale (number of cells, operations), whether undo/redo history is bounded, and if operations are only cell sets or include other types. Confirm that bulk undo/redo means moving k steps at once.

2. Design core data structures

Propose a doubly linked list where each node represents an operation (cell ID, old value, new value) and a hash map from cell ID to a stack of previous values for O(1) access to the last value. Explain how the linked list supports O(1) undo/redo by moving a pointer.

3. Handle bulk undo/redo

For bulk undo of k steps, traverse the linked list backwards k nodes, applying the inverse of each operation (restoring old values) and updating the cell value stacks. For redo, traverse forwards. Discuss time complexity O(k) and how to optimize if k is large.

4. Address edge cases and trade-offs

Discuss what happens when undo/redo reaches the beginning/end of history, how to handle new operations after undo (truncate redo history), and memory management (e.g., limiting history size, using persistent data structures).

5. Summarize and extend

Summarize the design, its time/space complexity, and potential extensions like supporting multiple users or collaborative editing. Mention how this scales for Airtable's use case.

Key Points to Mention

  • Doubly linked list for O(1) undo/redo pointer movement
  • Hash map from cell ID to stack of previous values for O(1) cell state restoration
  • Bulk operations: traverse k nodes and apply inverses, O(k) time
  • Truncating redo history when a new operation is performed after undo
  • Memory trade-offs: storing full history vs. bounded history with compaction
  • Sentinel nodes to simplify boundary conditions

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.