1. Suppose that after you have placed several items into a priority queue, you need to adjust one of their priority values. For example, a particular task in a priority queue of tasks could become either more or less urgent. How can you adjust a heap if a single value changes?
2. Show that within the pseudocode for the method heap Create you can replace the statement
for (index = n - 1 down to 0)
with
for (index = n / 2 down to 0)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here