-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Driver Input
LiftSystem ls = new LiftSystem(15, 2);
System.out.println(ls.getLiftState());
System.out.println(ls.addRequest(1, 10));
System.out.println(ls.addRequest(1, 12));
System.out.println(ls.addRequest(1, 14));
System.out.println(ls.addRequest(1, 14));
For this input it is always accepting request and returning true
however lift capacity is 2
so ideally it should fail
and when there is no one on board
it is looking for the nearest job to pick
ideally it should serve opposite direction first regardless of the nearest job priority else It will lead to starvation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels