Leetcode 621. Task Scheduler
Given tasks labeled A–Z and a cooldown n, compute the minimum number of CPU intervals (including idles) to finish all tasks so that identical tasks are separated by at least n intervals; the core challenge is arranging high-frequency tasks to minimize idle slots, typically solved by counting task frequencies and placing the most frequent tasks first (or simulating with a greedy/heap approach).
Asked at:
NVIDIA
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid June, 2026
Intern
Late May, 2026
Junior
Early May, 2026
Amazon
Mid-level
Question was the exact copy of the task scheduler leetcode question. The followup questions were on how to ensure a consistent total ordering when popping elements with the same frequency from the heap.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.