InterviewLegend

Grids & Graphs

Alex Chen9 min readGuide updated 17 real interview reports

Beyond the layer tree, Figma's graph prompts come from two places, the canvas and the design system. On the canvas, a marquee selection is a grid of cells you flood to count regions, and a renderer filling in tiles around the cached ones is a breadth-first spread from every seed at once. In the design system, components place instances of other components, so the library is a directed graph that you order for publishing and copy without duplicating the shared pieces. A few details decide these problems. Mark a grid cell visited the moment it enters the queue, and every fresh flood counts as one more region. When every cached tile spreads on the same frame, put all of them in the queue before the first pop, because one traversal per seed overcounts. Publish order is a topological sort, and a min-heap of ready components keeps ties deterministic. Any component whose indegree never reaches zero is caught in or behind a nesting cycle, so name those too. To clone the library, map each original id to its copy as soon as you find it, so a shared component is copied once.

The graph-traversal and topological-sort templates these build on, plus tips for talking through the round, are in Trees & Recursion.

FigmaPremium lesson · Coding round

The 4 Figma problems are below.

  1. A Premium questionCoding · Medium · Frequently asked
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 1 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Figma questions

$49 a year · all 122 companies · instant access

21,000+ candidate reports

Figma interview guide

Know what Figma asks before you walk in.

28 coding · 5 system design · 17 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Figma interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.