LeetCode 621: Task Scheduler — Step-by-Step Visual Trace
Medium — Heap | Greedy | Hash Table | Counting
The Problem
Given a list of tasks and a cooldown period n, find the minimum time needed to execute all tasks where identical tasks must be separated by at least n intervals.
Approach
Use a max heap to al...
blog.tracelit.dev1 min read