solulubeta
Sign in
NeetCode 150 / Heap / Priority Queue
09.05 · Problem

Task Scheduler

Medium Greedy on the most frequent task 1 video LC 621 Pro

This problem is part of solulu Pro

A CPU runs tasks labelled A to Z, one per time unit, or stays idle. Two runs of the same task must be at least n units apart. Return the minimum number of units needed to finish all tasks.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 68 of 150 · updated 2026-10-12