← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
There are n jobs that can be executed in parallel on a processor, where the execution time of the i-th job is executionTime[i]. To speed up execution, the following strategy is used:
In one operation, a job is chosen as the "major job" and is executed for x seconds. All other jobs are executed for y seconds where y < x.
A job is complete when it has been executed for at least executionTime[i] seconds, then it exits the pool. Find the minimum number of operations in which the processor can completely execute all the jobs if run optimally.
Strategy: