#621

Task Scheduler

medium· Heap / Priority Queueruns: 0

You are given an array of CPU tasks, each labeled with a letter, and a non-negative integer n that represents the cooldown period between two same tasks. Return the minimum number of intervals required to complete all tasks. Tasks can be done in any order; an interval may be idle.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.