Back to problems

Most Frequent Call Chain

Algorithm · Roblox · Medium

A monitoring tool captures a program's execution as a linear sequence of events. Each event either pushes a function onto the call stack or pops the most recent function off it. The input list traces consists of entries that follow one of two patterns: "-> function_name" – the named function is entered and placed on top of the active call chain. " function_name" event, the resulting call chain is recorded. You must determine which call chain appears most often during the…

Checking your access…