Ad
  • Custom User Avatar

    I'm having this problem too, but I'm pretty sure that this happens because of the repeated values in the array.

    It is not clear (at least for me) what the scheduler should do if there are jobs with the same CPU Cycles as the job required.

    For example, in the test we have:
    [3, 10, 10, 20, 1, 2] 2

    We need to execute only the jobs with less cycles than job at index 2 (10).
    In that case, we execute 1 + 2 + 3 + 10 -> 16 cycles.

    Or we also need to execute the jobs with the same length? 1 + 2 + 3 + 10 + 10 -> 26 cycles.