Skip to main content
Task Scheduler II
medium

Task Scheduler II

Your flashcards come up in a fixed order, one review a day at most, and a card you just saw has to rest for a set number of full days before it can return. On which day does the last review happen, if you take a day off only while the next card is still resting? Interviewers like it because the whole problem hides in that rest, and the classic trap is counting it one day short or one day long. Expect up to 20,000 reviews, card ids up to a billion, and a rest of 1 to 20,000 days.

Arrays & HashingSimulation

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix.

1Task Scheduler IImedium
Based onLeetCode

Code this one on a laptop

Email yourself a link and open it there.