$20
In this program, you will need to build a course roadmap using an interconnected linked list. Users can check what is the prerequisite course and what is the next course of the current course. For example, the prerequisite course for “Data Structure” is “Program Design”, and the next course for “Data Structure” is “Algorithms”. Therefore, you need to design and build an interconnected linked list using structure. The name of the structure should be course and it will have three members: char name[NAME_LENGTH], struct course *next, and struct course *prior. The name represents the course name. The next and prior are the structure pointers pointed to another struct course. The next points to the next course and the prior points to the prerequisite course. The figure below illustrates an example of how struct course connects with each other.
To let the program know how to build the interconnected linked list, users need to input the following format first via terminal and the table below describes the meaning of each input component:
<number of courses>
<course_id> <next> <piror> <course name>
…