Task Scheduler with Dependencies (Add/Consume)

Problem: Task Scheduler with Dependencies (Part 2)

Extend Part 1: tasks may depend on a list of subtasks. You still implement:

  • addTasks(tasks)
  • consumeTask()

Task format

Each task inc...

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: