Algorithm · Uber · Medium
You are analyzing the execution of a single-threaded CPU that runs a set of functions. The CPU can only run one function at a time, but functions may be paused when another function starts (nested execution). You are given an integer n, the total number of functions, which are identified by IDs from 0 to n-1. The execution flow is recorded in a list of log strings, logs. Each log string has three components separated by colons: the function ID, the event type (either "start"…
Checking your access…