Problem Statement

Production Line

A factory production line has multiple tasks that need to be performed in a specific order. Each task has an estimated duration and priority level. To optimize production, the factory wants to ensure that tasks are scheduled efficiently based on priority and duration.

You are tasked with designing a linked list structure to manage the tasks in the production line. Each task in the list should be represented as a node in the linked list, which contains the task name, duration, and priority. Your goal is to build functions to add, remove, and reorder tasks based on certain criteria.

Requirements

Create a Linked List Node Class. Each node should contain:

Implement a Linked List Class:

This class should have the following methods:

TIP: The reorder tasks are implemented by creating a new linked list to which the different nodes are added based on priority. This means that you first need to implement two helper methods:

Develop a Solution to Optimize Task Order

Given a series of tasks (see tasks.csv1), reorder them to optimize for the shortest completion time. Consider both priority and duration.