Task Scheduling

  • + 0 comments

    Just leaving this here: ๐Ÿงช Try 1: Schedule in input order

    Tasks in order: (3, 4), (2, 5), (1, 3)

    Time goes like this: - Task 1: takes 3 minutes โ†’ finishes at time = 3 โ†’ deadline = 4 โ†’ lateness = 0 - Task 2: takes 2 minutes โ†’ finishes at time = 3 + 2 = 5 โ†’ deadline = 5 โ†’ lateness = 0 - Task 3: takes 1 minute โ†’ finishes at time = 5 + 1 = 6 โ†’ deadline = 3 โ†’ lateness = 6 - 3 = 3 โ—