Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2365. Task Scheduler II
Given an ordered list of task types and a cooldown "space", find the minimum total days (including required breaks) to finish all tasks while ensuring any two tasks of the same type are separated by at least space days. Core idea: simulate tasks sequentially and greedily track the last completion day per type, inserting waits when the cooldown requirement isn't yet met.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.