Reported interview periodNot available
Per-function exclusive runtime from a call log
A single thread records start and end events for nested function calls. For each function id, work out how many time units it actually spent running, excluding the units spent inside calls it made.
Practice focusRequirements - Line one is the number of functions; ids run from 0 to count - 1 and every id appears at least once. Line two is the number of event lines. - Each remaining line is <id :<start|end :<timestamp with integer fields. Events are chronological and properly nested on one thread. - An end timestamp is inclusive: the unit at that timestamp belongs to the call that is ending, so it contributes timestamp - previous + 1 units. - When a call begins on top of a running call, credit the units since the previous boundary to the caller.…