Roblox logo

Roblox Hard Interview Questions

7 hard-level practice questions for Roblox technical interviews

Roblox software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
5
Coding
1
System Design
coding Hard Verified Question #1

1. Rate Limiter with Experience


Category: Sliding window coding problem
Implement a rate limiting system for Roblox. This is a two-part problem, with a follow up taking in additional factors into the rate limiting.
Input: List
Output: Computed result
Want to practise this one?
Create a free account to open the full question and practise Roblox questions with AI.
Sign up free
coding Hard Verified Question #2

2. [OA] Library Book Tracker


Category: Array coding problem
Your task is to develop a library book circulation tracker. You are given a sequence of operations that represent activities in a library. Each...
Input: Array
Output: Array
coding Hard Verified Question #3

3. [Creativity Round] Preventing Harassment In-Game


Category: Algorithm coding problem
Input: List
Output: Computed result
coding Hard Verified Question #4

4. Request Rate Detector


Category: Algorithm coding problem
An API gateway monitors requests to detect abusive clients. Implement the RequestRateDetector class. configure(limit: int, window: int) -...
Input: Number(s)
Output: Integer
coding Hard Verified Question #5

5. Uniform Array Segmentation


Category: Array coding problem
A task distribution system needs to split a workload evenly among workers. You are given an integer array tasks of length n and an integer...
Input: Array
Output: Computed result
system design Hard Verified Question #6

6. Top 5 Recently Asked Roblox System Design Questions


Category: Graph system design problem
These are the commonly asked system design questions from Roblox interviews. Roblox's interview focus includes high-scale distributed systems with a...
Input: Graph (nodes and edges)
Output: Computed result
system design Hard caching #1

1. Design AssetResourceLoader — a byte-bounded, reference-counted resource cache


Background


Roblox clients load meshes, textures, and audio while joining and streaming experiences. Model the in-process resource loader that checks a local disk source before a CDN source and retains loaded bytes for active consumers. This is an adaptation of a candidate-reported Roblox resource-loader interview question; the cache policies below are explicit requirements for this exercise, not claims about Roblox's production implementation.

Requirements


1. Construct a loader with a positive byte capacity and two injected synchronous callbacks: disk_load and cdn_load. Each accepts an asset ID and returns immutable, nonempty bytes or None when unavailable. On a cache miss, consult disk first and consult the CDN only if disk returns None. Do not write CDN results back to disk.
2. acquire(asset_id) returns the asset's bytes and adds one active reference. A cache hit does not invoke either callback and makes the asset most recently used. A successful cache insertion starts with one reference and is also most recently used. An entry with at least one reference is pinned and cannot be evicted.
3. Cached payload bytes must never exceed capacity. Before inserting a loaded asset, determine whether sufficient space can be reclaimed from unpinned entries. If so, evict unpinned entries in least-recently-acquired order, skipping pinned entries, until the asset fits. If the asset exceeds capacity or insufficient space can be reclaimed, return None without changing cache contents, reference counts, or order. Once disk returns bytes, do not try the CDN even if those bytes cannot be admitted.
4. release(asset_id) removes exactly one active reference and returns True; return False if the asset is absent or already has zero references. Releasing an asset does not change its recency or immediately evict it. invalidate(asset_id) removes an unpinned cached asset and returns True; return False for an absent or pinned asset.
5. An unavailable asset returns None and is not negatively cached. Callback exceptions propagate, leaving the cache unchanged. snapshot() returns (asset_id, byte_size, reference_count) tuples in least-to-most-recently-acquired order, without changing state. All failure paths must preserve the same ordering as well as the same contents.

Class API


  • AssetResourceLoader(capacity_bytes: int, disk_load: Callable[[str], bytes | None], cdn_load: Callable[[str], bytes | None]) — construct an empty loader; reject nonpositive capacity with ValueError.

  • acquire(asset_id: str) -> bytes | None — acquire one reference to an available, admissible asset.

  • release(asset_id: str) -> bool — release one reference without changing recency.

  • invalidate(asset_id: str) -> bool — remove an entry only when it is unpinned.

  • snapshot() -> list[tuple[str, int, int]] — return a detached view of cached entries in eviction order.


Example 1


The capacity is 10 bytes. The disk fixture contains mesh:A = b"AAAA" and texture:B = b"BBBB". The CDN fixture contains audio:C = b"CCCCCC". Missing fixture keys return None.
Input sequence
acquire("mesh:A")
acquire("texture:B")
release("mesh:A")
acquire("audio:C")
snapshot()
invalidate("texture:B")
release("texture:B")
invalidate("texture:B")
snapshot()
Output, one result per call
b"AAAA"
b"BBBB"
True
b"CCCCCC"
[("texture:B", 4, 1), ("audio:C", 6, 1)]
False
True
True
[("audio:C", 6, 1)]
Explanation: Initially, the cache uses 4 + 4 = 8 bytes. Loading the six-byte audio asset requires reclaiming four bytes. mesh:A is unpinned and oldest, so evicting it leaves 4 + 6 = 10 bytes. texture:B cannot be invalidated until its active reference is released.

Example 2


The capacity is 8 bytes. Disk contains mesh:A = b"AAAA" and texture:B = b"BBBB". CDN contains audio:C = b"CCCCCC".
Input sequence
acquire("mesh:A")
acquire("texture:B")
release("mesh:A")
acquire("audio:C")
snapshot()
release("texture:B")
acquire("audio:C")
snapshot()
Output, one result per call
b"AAAA"
b"BBBB"
True
None
[("mesh:A", 4, 0), ("texture:B", 4, 1)]
True
b"CCCCCC"
[("audio:C", 6, 1)]
Explanation: The first audio acquisition needs six bytes reclaimed because 8 + 6 - 8 = 6. Only four bytes are unpinned, so admission fails without evicting mesh:A. After releasing texture:B, both four-byte entries are eligible. The second attempt loads the audio again and evicts both entries, leaving six cached bytes.

Constraints


  • 1 <= capacity_bytes <= 10^9; at most 10^5 method calls and 10^5 distinct asset IDs.

  • Asset IDs are nonempty strings of at most 200 characters. Successful callback results are immutable bytes of length 1 through 10^9.

  • Calls are sequential. Callbacks do not reenter the loader; thread safety and asynchronous fetching are out of scope.

  • The byte budget covers retained payloads only, not metadata or temporary callback results. Ignore allocator overhead.

  • Cached assets do not change until evicted or invalidated. Aim for expected O(1) cache hits, releases, and invalidations; cache-miss admission may scan cached entries.
Want to practise this one?
Create a free account to open the full question and practise Roblox questions with AI.
Sign up free

Start practicing Roblox questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free