Find Most Called Function in Stack Trace
Given a list representing a stack trace with functions and directional arrows ('->' for calls, '<-' for returns), determine which function is called the most frequently. The input is guaranteed to be valid.
Asked at:
Roblox
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
Roblox
Staff
Multiple parts 1) Get max frequency path 2) Split tie with depth of the call 3) Get max frequency per thread specified in the call
Mid August, 2026
Roblox
Senior
3 Steps. First step is the original question. Second step is tiebreaker based on stack depth. Third is the event stack includes different threads.
Late July, 2026
Roblox
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.