Get Total Execution Time

Get Total Execution Time is a coding interview problem from Ibm interviews. Given n functions and logs in the form id:start/end:timestamp for a single-threaded CPU with preemption, determine the exclusive execution time for each function ID 0..n-1 and return an int array. A concise interview question on log interpretation.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: