1. In the solution to the bank simulation problem, can the event list be a queue? Can the event list be a list or sorted list?
2. Consider the stack-based search of the flight map in the HPAir. You can replace the stack that searchS uses with a queue. That is, you can replace every call to push with a call to enqueue , every call to pop with a call to dequeue , and every call to peek with a call to peekFront . Trace the resulting algorithm when you fly from P to Z in the flight map. Indicate the contents of the queue after every operation on it.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here