PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Roblox

Implement a Log Rate Limiter

Last updated: Apr 6, 2026

Quick Overview

This question evaluates a candidate's ability to design and implement time-based rate limiting and stateful event tracking using appropriate data structures and algorithmic analysis.

  • medium
  • Roblox
  • Coding & Algorithms
  • Software Engineer

Implement a Log Rate Limiter

Company: Roblox

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

You are building a backend logging service. Implement a class that decides whether an incoming log message should be emitted. Each request provides: - `timestamp`: an integer timestamp in seconds, arriving in nondecreasing order - `message`: a string message key Return `true` if the message should be emitted at that timestamp, and `false` otherwise. A message may be emitted only if the same message has not been emitted during the previous 10 seconds. Different messages are tracked independently. Example: - `(1, "foo") -> true` - `(2, "bar") -> true` - `(3, "foo") -> false` - `(11, "foo") -> true` Discuss the time and space complexity of your approach.

Quick Answer: This question evaluates a candidate's ability to design and implement time-based rate limiting and stateful event tracking using appropriate data structures and algorithmic analysis.

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
Sep 25, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
7
0
Loading...

You are building a backend logging service. Implement a class that decides whether an incoming log message should be emitted.

Each request provides:

  • timestamp : an integer timestamp in seconds, arriving in nondecreasing order
  • message : a string message key

Return true if the message should be emitted at that timestamp, and false otherwise.

A message may be emitted only if the same message has not been emitted during the previous 10 seconds. Different messages are tracked independently.

Example:

  • (1, "foo") -> true
  • (2, "bar") -> true
  • (3, "foo") -> false
  • (11, "foo") -> true

Discuss the time and space complexity of your approach.

Submit Your Answer to Earn 20XP

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 8,000+ 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.