← Roblox Interview Insights

Roblox·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Did a technical screen for a Software Engineer role at Roblox. Just one coding problem, grid traversal stuff, pretty standard but I fumbled around a bit before getting to a clean solution.

Questions Asked (1)

Q1

Given a 2D grid with a start cell, a target cell, obstacle cells, and free cells, determine whether there is a valid path from start to target moving in four directions without stepping on obstacles or leaving the grid.

Algorithms & Data Structures
Author's notes

Classic reachability problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the grid as a graph where each free cell is a node connected to its four orthogonal neighbors, then perform BFS or DFS from the start to see if the target is reachable. BFS is preferred for shortest path, but DFS works for reachability; both have O(R*C) time and space complexity.

Pro tip: Clarify edge cases upfront (start equals target, start or target on obstacle, empty grid) and mention that BFS avoids recursion depth issues on large grids, showing you think about production constraints.

1. Clarify problem and edge cases

Confirm grid dimensions, movement rules, and what constitutes a valid path. Ask about edge cases like start == target, start/target being obstacles, or empty grid.

2. Choose traversal algorithm

Select BFS for shortest path or DFS for simple reachability. Explain that BFS uses a queue and DFS uses a stack/recursion, both visiting each cell at most once.

3. Implement traversal with visited tracking

Use a visited set or modify the grid in-place to avoid revisiting cells. For each cell, check its four neighbors, ensuring they are within bounds and not obstacles.

4. Analyze complexity and optimize

State time and space complexity: O(R*C) for both. Discuss potential optimizations like early termination when target is found or using bidirectional BFS for large grids.

5. Test with examples

Walk through a simple grid example to verify correctness, including cases with no path and multiple paths. Mention how you would handle large grids or memory constraints.

Key Points to Mention

  • Graph traversal algorithms: BFS vs DFS, and when to use each
  • Time and space complexity: O(R*C) for both, with O(R*C) space for visited set
  • Handling edge cases: start == target, obstacles at start/target, empty grid
  • In-place modification vs separate visited set for space optimization
  • Early termination when target is found to save time
  • Bidirectional BFS for potential performance improvement on large grids

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