A single-threaded CPU runs a program with `n` functions, each with an id from `0` to `n - 1`. Function calls use a call stack: a call pushes the id, and when a function ends its id is popped. You are given `logs`, where each entry is `"{id}:start:{timestamp}"` or `"{id}:end:{timestamp}"`. A start log means the function began at the beginning of that timestamp, and an end log means it finished at the end of that timestamp. A function may be called several times, including recursively. The exclusive time of a function is the total time it spent running, not counting time spent in functions it called. Return an array where entry `i` is the exclusive time of function `i`.
A single-threaded CPU runs a program with n functions, each with an id from 0 to n - 1. Function calls use a call stack: a call pushes the id, and when a function ends its id is popped. You are given logs, where each entry is "{id}:start:{timestamp}" or "{id}:end:{timestamp}". A start log means the function began at the beginning of that timestamp, and an end log means it finished at the end of that timestamp. A function may be called several times, including recursively. The exclusive time of a function is the total time it spent running, not counting time spent in functions it called. Return an array where entry i is the exclusive time of function i.