Medium
Quiz
#621 Task Scheduler
APPROACH
You are given a list of CPU tasks, each labeled A–Z, and a cooldown integer n. The CPU processes one task per interval or sits idle. Identical task labels must be separated by at least n intervals. Return the minimum total number of CPU intervals needed to finish all tasks.
1 of 4
1:00
What is the optimal approach for this problem?