← Figma Interview Insights

Figma·Software Engineer·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Figma software engineer interview focused on designing a document layer with a clean property API, then pushing the design further into batch operations, undo/redo, and history compaction. More of a systems thinking exercise than a pure coding one, which I wasn't fully expecting.

Questions Asked (2)

Q1

Design and implement a Document Layer object with apply(key, value) and get(key) methods, where apply sets or overwrites a property, deletes it when value is None, and get returns the current value or None if absent.

API & IntegrationsSystem DesignTechnical Trade-offs
Author's notes

The core implementation wasn't bad.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a simple design using a dictionary or map with appropriate null handling. Implement the methods with clear semantics, and discuss trade-offs such as concurrency, persistence, and integration with Figma's document model.

Pro tip: Demonstrate awareness of Figma's collaborative editing environment by discussing how to handle concurrent modifications and ensure consistency across clients.

1. Clarify Requirements

Ask questions to understand the expected scale, concurrency needs, persistence requirements, and how this layer integrates with existing systems.

2. Design the API

Define the exact behavior of apply and get, including edge cases like null values, key types, and error handling.

3. Implement the Core Logic

Write pseudocode or actual code using a suitable data structure (e.g., hash map) and handle set, overwrite, and delete operations.

4. Discuss Trade-offs

Analyze choices around data structures, concurrency control, memory usage, and performance implications.

5. Extend to System Design

Consider how this layer fits into a larger system, including persistence, synchronization, and API integration.

Key Points to Mention

  • Use of a hash map for O(1) average time complexity for get and apply.
  • Handling of null values as deletion, and ensuring get returns null for missing keys.
  • Concurrency considerations: thread safety, locking, or optimistic concurrency control.
  • Persistence and durability: how changes are stored and propagated in a distributed system.
  • Integration with Figma's collaborative features: real-time updates, conflict resolution.
  • API design principles: idempotency, error handling, and clear semantics.

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

Q2

How would you extend this design to support batching multiple property changes atomically, implementing undo/redo via an operation log, and compacting history to save memory?

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where the interview got interesting and where I think I gave a mixed performance.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current design and the requirements for atomic batching, undo/redo, and memory efficiency. Then propose a layered solution: a transaction manager to group changes, an operation log with inverse operations for undo/redo, and a compaction strategy that periodically merges or discards redundant operations. Finally, discuss trade-offs such as performance overhead, memory usage, and complexity.

Pro tip: Emphasize that undo/redo should be based on inverse operations rather than full state snapshots to save memory, and that compaction can be triggered based on memory thresholds or operation count, balancing responsiveness and resource usage.

1. Clarify Requirements and Constraints

Ask about the expected scale (number of properties, frequency of changes), memory limits, and whether undo/redo needs to be persistent across sessions. This ensures your solution aligns with the actual needs.

2. Design Atomic Batching

Introduce a transaction abstraction that groups multiple property changes into a single atomic unit. Ensure that either all changes are applied or none, using a two-phase commit or a similar mechanism.

3. Implement Undo/Redo via Operation Log

Maintain a log of operations, each with an inverse operation. Undo applies the inverse of the last operation; redo reapplies the original. Use a pointer to track the current position in the log.

4. Add History Compaction

Periodically compact the log by merging consecutive operations on the same property or discarding operations that are no longer needed (e.g., when the log exceeds a size limit). Consider using a threshold-based or time-based trigger.

5. Discuss Trade-offs and Optimizations

Address trade-offs such as memory vs. undo granularity, performance impact of logging, and complexity of compaction. Suggest optimizations like lazy compaction or using a circular buffer.

Key Points to Mention

  • Atomicity: Use transactions with commit/rollback to ensure all-or-nothing changes.
  • Inverse operations: For each operation, define an inverse to enable undo without storing full snapshots.
  • Operation log structure: Use a doubly-linked list or array with a pointer for efficient undo/redo traversal.
  • Compaction strategies: Merge operations on the same property, discard old operations, or use a threshold to trigger compaction.
  • Memory management: Consider using weak references or serializing old operations to disk if persistence is needed.
  • Concurrency: If multiple users or threads are involved, ensure the operation log is thread-safe or use a lock-free approach.

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