Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PART A - LinkedLists ( 5 5 marks ) When a student wishes to register for a course, they are placed on a waitlist if
PART A LinkedLists marks
When a student wishes to register for a course, they are placed on a waitlist if the class is already full.
Students can register from the waitlist when a spot become available and if they have permission. In our
simplified simulation of a waitlist, the system randomly performs one of four operations and updates the
waitlist accordingly. For simplicity, we assume that:
only one operation can be performed in a day;
a waitlisted student has a maximum of two days to complete their registration once they are
permitted to register. If not registered after two days, the student becomes the last person on
the list, in order to give other students a chance;
only one student first person on the list can be granted permission to register at any point.
A waitlisted student is a student with a waitlist status Waitlisted or PermittedToRegister and
may have some number of days left to complete registration if they have been permitted to
register.
The details of each operation and the rules applying are provided below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started