PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Roblox

Select Maximum Call Stacks Across Threads

Last updated: Aug 2, 2026

Quick Overview

Design queries that identify the most frequently sampled call stack overall and per thread under deterministic tie rules. Discuss precise stack identity, empty samples, deep frames, large names, streaming input, distributed aggregation, and complexity without mixing counts across threads.

  • medium
  • Roblox
  • Software Engineering Fundamentals
  • Software Engineer

Select Maximum Call Stacks Across Threads

Company: Roblox

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

You receive a collection of sampled call stacks. Each sample contains a `threadId` and an ordered list of frames from root to leaf. Design an algorithm and data model for the following related queries. ### Part 1: Most Frequent Stack Return the distinct stack observed most often across all samples. If several stacks have the same count, return the deepest one. State a final deterministic tie-breaker when count and depth are both equal. #### What This Part Should Cover - A precise definition of stack equality - Canonical keys and frequency counting - Tie-breaking by count, depth, and a stable final rule - Time and space complexity ### Part 2: Per-Thread Results Return the winning stack independently for each thread using the same ordering rules. Explain whether identical stacks from different threads share storage or counts. #### What This Part Should Cover - Correct partitioning by thread - Reuse without accidentally mixing frequencies - Output behavior for threads with no valid frames ### Part 3: Scale and Representation Discuss how the solution changes when stacks are very deep, frame names are large strings, or samples arrive as a stream. #### What This Part Should Cover - Interning, tries, hashes, or other compact representations - Collision handling if hashes are used - Incremental winner maintenance ### What a Strong Answer Covers A strong answer begins by clarifying the sample representation because the original task description is terse. It gives a simple correct map-based solution before proposing compressed or streaming variants. ### Follow-up Questions - How would you merge partial aggregates from several machines? - How would you compare stacks if addresses must first be symbolized? - What if the winner is based on inclusive frame counts rather than exact-stack frequency?

Quick Answer: Design queries that identify the most frequently sampled call stack overall and per thread under deterministic tie rules. Discuss precise stack identity, empty samples, deep frames, large names, streaming input, distributed aggregation, and complexity without mixing counts across threads.

Related Interview Questions

  • Implement a Rolling-Window Rate Limiter - Roblox (medium)
|Home/Software Engineering Fundamentals/Roblox

Select Maximum Call Stacks Across Threads

Roblox logo
Roblox
Jul 18, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
2
0

You receive a collection of sampled call stacks. Each sample contains a threadId and an ordered list of frames from root to leaf. Design an algorithm and data model for the following related queries.

Part 1: Most Frequent Stack

Return the distinct stack observed most often across all samples. If several stacks have the same count, return the deepest one. State a final deterministic tie-breaker when count and depth are both equal.

What This Part Should Cover Guidance

  • A precise definition of stack equality
  • Canonical keys and frequency counting
  • Tie-breaking by count, depth, and a stable final rule
  • Time and space complexity

Part 2: Per-Thread Results

Return the winning stack independently for each thread using the same ordering rules. Explain whether identical stacks from different threads share storage or counts.

What This Part Should Cover Guidance

  • Correct partitioning by thread
  • Reuse without accidentally mixing frequencies
  • Output behavior for threads with no valid frames

Part 3: Scale and Representation

Discuss how the solution changes when stacks are very deep, frame names are large strings, or samples arrive as a stream.

What This Part Should Cover Guidance

  • Interning, tries, hashes, or other compact representations
  • Collision handling if hashes are used
  • Incremental winner maintenance

What a Strong Answer Covers Guidance

A strong answer begins by clarifying the sample representation because the original task description is terse. It gives a simple correct map-based solution before proposing compressed or streaming variants.

Follow-up Questions Guidance

  • How would you merge partial aggregates from several machines?
  • How would you compare stacks if addresses must first be symbolized?
  • What if the winner is based on inclusive frame counts rather than exact-stack frequency?
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Roblox•More Software Engineer•Roblox Software Engineer•Roblox Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.