← Roblox Interview Insights

Roblox·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Roblox SWE interview with a simulation-style coding problem that had more moving parts than I expected. The candy crush board question sounds like a fun leetcode problem until you're actually implementing it under pressure.

Questions Asked (1)

Q1

Given a 2D grid representing a candy board, implement a function that repeatedly crushes groups of 3 or more same-type candies (horizontally or vertically), applies gravity so remaining candies fall down, and returns the final stable board.

Algorithms & Data Structures
Author's notes

Three distinct phases and you have to get all of them right.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem as a simulation loop: repeatedly scan the board to mark all candies that are part of a horizontal or vertical run of 3 or more, remove them, then apply gravity by shifting candies down in each column. Continue until a full pass produces no removals, then return the board.

Pro tip: Clarify edge cases and constraints upfront (e.g., board dimensions, candy types, whether new candies spawn) and discuss time/space complexity, since interviewers at Roblox value production-ready thinking and clean, testable code.

1. Clarify requirements and constraints

Ask about board size, candy types, whether new candies appear after crushing, and if the board can be modified in place. Confirm the definition of a stable board.

2. Design the crush detection

Scan rows and columns to identify all candies that are part of a run of 3 or more. Use a boolean mask to mark them for removal, ensuring overlapping runs are handled correctly.

3. Implement removal and gravity

Remove marked candies (e.g., set to empty) and then apply gravity by shifting remaining candies down in each column, filling empty spaces at the top.

4. Iterate until stable

Repeat the crush and gravity steps until a full pass results in no removals. Return the final board.

5. Analyze complexity and test

Discuss time and space complexity, and walk through edge cases like empty board, no matches, and cascading matches. Suggest test cases.

Key Points to Mention

  • Use a boolean mask to mark candies to remove, avoiding mutation during scan.
  • Handle both horizontal and vertical runs, including overlapping ones.
  • Apply gravity column-wise by compacting non-empty cells downward.
  • Loop until no changes occur to handle cascading crushes.
  • Time complexity: O(R * C * K) where K is number of iterations; space O(R * C).
  • Consider in-place modification vs. creating a new board for clarity.

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