Reconstruct Function Start/End Events from Sampled Call Stacks

Given call stacks sampled by a profiler at different timestamps, reconstruct START and END events from changes between consecutive samples.

Each sample consists of a timestamp and a call stack or...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: