Back to problems

Incremental Task Scheduler

Algorithm · LinkedIn · Medium

Problem Implement a TaskScheduler that manages tasks, each with a unique string identifier and a list of prerequisites. A task can only run after every one of its prerequisite tasks has finished execution. Your scheduler must provide the following operations: TaskScheduler() Initializes a new, empty scheduler instance. boolean addTask(Task task) Registers a new task in the system. The task has a unique id and a list of prerequisite dependencies. If the task is accepted (no…

Checking your access…