PracHub
QuestionsPremiumLearningGuidesInterview PrepCoaches
|Home/Coding & Algorithms/Roblox

Design robot path boundedness with repeats

Last updated: May 25, 2026

Quick Overview

This question evaluates algorithmic skills in parsing compressed instruction strings, finite-state simulation, and spatial reasoning to determine path boundedness, and it belongs to the Coding & Algorithms domain.

  • Medium
  • Roblox
  • Coding & Algorithms
  • Software Engineer

Design robot path boundedness with repeats

Company: Roblox

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

You are given a 2D grid with a set of blocked cells (obstacles) and a robot starting at (0, 0) facing north. The robot executes a finite instruction string S consisting of commands: G (move forward 1 if the next cell is not blocked, otherwise stay in place), L (turn left 90°), R (turn right 90°), and digits 2–9 meaning “repeat the immediately preceding command that many additional times” (e.g., G3 means move forward a total of 3 steps, R2 means turn right twice). After one execution of S, report the robot’s final (x, y) and heading. Then determine whether the path is bounded if S is repeated infinitely; i.e., whether there exists a fixed square of side length B that contains all visited positions under infinite repetitions. Return true if bounded, otherwise false. Design an algorithm that avoids simulating an unbounded number of steps and analyze its time and space complexity.

Quick Answer: This question evaluates algorithmic skills in parsing compressed instruction strings, finite-state simulation, and spatial reasoning to determine path boundedness, and it belongs to the Coding & Algorithms domain.

Related Interview Questions

  • Find Windows Containing a Target - Roblox (medium)
  • Implement Sliding-Window Rate Limiter - Roblox (medium)
  • Find target-heavy sliding windows - Roblox (medium)
  • Find most frequent call path in logs - Roblox (medium)
  • Track Highest-Earning Experience - Roblox (medium)
Roblox logo
Roblox
Aug 1, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
18
0

You are given a 2D grid with a set of blocked cells (obstacles) and a robot starting at (0, 0) facing north. The robot executes a finite instruction string S consisting of commands: G (move forward 1 if the next cell is not blocked, otherwise stay in place), L (turn left 90°), R (turn right 90°), and digits 2–9 meaning “repeat the immediately preceding command that many additional times” (e.g., G3 means move forward a total of 3 steps, R2 means turn right twice). After one execution of S, report the robot’s final (x, y) and heading. Then determine whether the path is bounded if S is repeated infinitely; i.e., whether there exists a fixed square of side length B that contains all visited positions under infinite repetitions. Return true if bounded, otherwise false. Design an algorithm that avoids simulating an unbounded number of steps and analyze its time and space complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Roblox•More Software Engineer•Roblox Software Engineer•Roblox Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.