← Figma Interview Insights

Figma·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

Figma SWE interview that went deep on a layered drawing editor with undo/redo. The design side took longer than I expected and the edge cases around redo invalidation tripped me up a bit.

Questions Asked (1)

Q1

Design and implement a layered image editor that supports adding, removing, reordering, and editing layers, plus undo and redo. How do you handle edge cases like undoing when the stack is empty, or a new operation wiping the redo history?

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

The undo/redo skeleton felt familiar but I fumbled the redo invalidation rule.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a layered architecture with a command pattern for undo/redo. Discuss data structures for layers and the undo/redo stacks, and explicitly address edge cases and trade-offs.

Pro tip: Demonstrate awareness of real-world constraints like memory usage and performance by suggesting optimizations such as command compression or snapshotting, and tie your design to Figma's collaborative editing context.

1. Clarify Requirements and Scope

Ask questions to understand expected scale, layer types, operations, and whether undo/redo should be global or per-layer. Confirm if real-time collaboration is needed.

2. Design Core Data Structures

Propose a layered model (e.g., list of layers with z-index) and a command pattern for operations. Use two stacks for undo and redo, and consider using a doubly-linked list or array for layers.

3. Implement Operations and Undo/Redo

Define how each operation (add, remove, reorder, edit) is encapsulated as a command with execute and undo methods. Explain how undo/redo stacks are updated and how new operations clear the redo stack.

4. Handle Edge Cases

Address undoing when the stack is empty (no-op or disable UI), redoing when empty, and clearing redo history on new operations. Discuss handling of failed operations and memory management.

5. Discuss Trade-offs and Optimizations

Compare command pattern vs. snapshotting for memory and performance. Suggest optimizations like command merging, lazy snapshots, or persistent data structures for scalability.

Key Points to Mention

  • Command pattern for encapsulating operations with undo/redo
  • Two stacks (undo and redo) with clear semantics for empty stacks
  • New operation clears redo stack to maintain linear history
  • Layer data structure: array or linked list with z-index for ordering
  • Memory vs. performance trade-offs: command pattern vs. snapshots
  • Edge cases: empty undo/redo, failed operations, and concurrency (if applicable)

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