Greedy Algorithms - Task Scheduler (CPU Cooling)
What is the time complexity of the optimal Task Scheduler algorithm using a max-heap for
t total tasks and m unique tasks?t total tasks and m unique tasks?m (unique tasks). Each task is pushed and popped at most once per execution.t tasks, each heap operation costs O(log m), so total is O(t log m).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions