leetcode-621-Task Scheduler

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zem_nezer/article/details/86663685

Error:
do not know how to do: Actually I know part of answer, but do not think it thoroughly.

In here, we have two cases: mainly of max. char or not mainly of max. char.

ideally, the answer is idle + total of task

so it need to know how many idle in it. which we get (max. - 1) * n empty position and fill remain alpha in it, if idle >= 0 than output idle + task.size(), otherwise output task.size()

猜你喜欢

转载自blog.csdn.net/zem_nezer/article/details/86663685