Task Scheduler with Dependencies (Add/Consume)
Problem: Task Scheduler (Part 1)
Implement a task scheduler that supports batch insertion and consuming tasks in priority order.
You must implement two methods:
addTasks(tasks): add a batch ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
