Exclusive Time of Functions at Anthropic
Medium66.1% acceptance
This problem has 75.0% frequency at Anthropic.
Problem Description
On a **single-threaded** CPU, we execute a program containing `n` functions. Each function has a unique ID between `0` and `n-1`. Function calls are **stored in a[call stack](<https://en.wikipedia.org/wiki/Call_stack>)**: when a function call starts, its ID is pushed onto the stack, and when a func...
Read full problem and hints