Roblox Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Detect shuffle-mode sequence
Question Given a playlist of distinct songs and two player modes—Random (each next song chosen independently and uniformly at random, with replacement...
Randomly partition array into k segments
Question Given a list of integers and an integer k representing the number of segments, write a function that randomly partitions the list into k non-...
Implement Python Function for Statistical Test P-Values
Scenario You need a utility that calculates p-values for one-sided and two-sided statistical tests. Question Write a Python function compute_p_value(s...
Extend counter to per-client rate limiting
You are extending the recent-requests counter to support per-client rate limiting. Each request now includes a clientId identifying the caller. You mu...
Implement recent-requests counter
You are designing an in-memory component for a web service that needs to track how many requests ("hits") it has received in the last 5 minutes. Imple...
Optimize bread-factory pipeline for max profit
You can assemble a production line by choosing modules of three types: Mixers, Ovens, Packers. Each module i has (type, build_cost_i, throughput_i uni...
Optimize assembly-line scheduling with changeovers
You are scheduling a simplified car-assembly line with two parallel stations S1 and S2. Each job must be processed on exactly one station, processing ...
Implement streaming CTR with deduplication
Implement a Python function to compute streaming, per-campaign CTR over a sliding 24-hour window with click de-duplication and late-arriving events. R...
Simulate robot path and detect boundedness
A robot starts at (0, 0) facing north on an infinite 2D plane. It executes a command string s consisting of 'G' (move forward one unit), 'L' (turn lef...
Detect runs and collapse a numeric grid
You are given an m x n grid of digits (0– 9). Phase 1: Find every horizontal or vertical run of length ≥ 3 consisting of the same digit. For each run,...
Implement queue-based rate limiter with multi-key limits
Implement a rate limiter with method allow(timestamp) that returns true if a request is allowed under a limit of K requests per rolling window W milli...
Find largest digit-sum bucket size
You are given two integers low and high (inclusive). Define s(x) as the sum of the decimal digits of x. For every integer x in [low, high], place x in...
Find most frequent call stack from logs
Given an array of log entries for a single-threaded program's function calls, each entry is either '->Name' (function entry) or '<-Name' (function exi...
Detect robot state after movements
Question Implement an algorithm to determine whether a robot following a given set of movement instructions ends in a valid recognized state (variant ...
Design robot path boundedness with repeats
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 s...