Beruflich Dokumente
Kultur Dokumente
a. Show how the heap would look after this series of operations:
pq.Enqueue(28);
pq.Enqueue(2);
pq.Enqueue(40);
pq.Dequeue(x);
pq.Dequeue(y);
pq.Dequeue(z);
b. What would the values of x, y, and z be after the series of operations in
part (a)?
7. Describe the graph pictured above, using the formal graph notation.
V(StateGraph) =
E(StateGraph) =
9. a. Is there a path from Oregon to any other state in the graph?
h. Is there a path from Hawaii to every other state in the graph?
i. From which state(s) in the graph is there a path to Hawaii?
10. a. Show the adjacency matrix that would describe the edges in the graph. Store the vertices in
alphabetical order.
j. Show the array-of-pointers adjacency lists that would describe the edges in the graph.