New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Coding Question
Hack2hire 50 Picks
AI Insights
Quick Summary
Simulate a call stack by processing sequential function call and return traces.
Record the current execution chain as a formatted string immediately after each function call.
Identify the most frequent chain, using maximum depth as a deterministic tiebreaker.
What This Tests
Stack simulation and dynamic state tracking
Frequency counting with hash maps
String formatting and tie-breaking logic
Common Patterns
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
3.1k
/6k
Acceptance Rate
52.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
traces =
Output
Expected