Reported interview periodJul 2025–Aug 2026
Reconstruct Stack Transitions from Samples and Events
Build utilities for converting between stack observations and call events. Stack frames are ordered outermost to innermost.
Practice focusFor an event stream, push on enter / start , pop on exit / end , record the stack after each event, and run-length encode adjacent identical stacks. For sampled stacks, compare adjacent samples using their longest common prefix. Emit removed frames as end events from innermost outward, then emit added frames as start events from outermost inward. Use the new sample's timestamp and leave frames in the final sample open. Samples have ts and stack fields; events emitted from samples have name , kind ( start or end ) and ts .…