1. Revise the pseudocode for the ADT heap methods add and heap Rebuild so that they do not swap items.
2. Suppose that you have two items with the same priority value. How does the order in which you insert these items into a priority queue affect the order in which they will be removed? What can you do if you need entries whose priority values are equal to be served on a first-come, first-served basis?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here