Question: Question 14. Starting with an empty priority queue, represented as a heap, draw the heap that results from. Exercises 579 11. Consider a tree with
Question 14. Starting with an empty priority queue, represented as a heap, draw the heap that results from.
Exercises 579 11. Consider a tree with the following number of levels:1 (contains only the root), 2, 3, 5, 10, N a. If full, how many nodes does it contain? b. If complete, what is the minimum number of nodes it contains e. If complete, what is the maximum number of nodes it contains? 12. Draw three separate heaps containing the nodes 1, 2,3, and 4 13. Starting with the priority queue represented by the heap shown below (start over again with this heap for each part of the question) draw the heap that results from a. one dequeue. b. two dequeues. c. three dequeues d. enqueue 1 e enqueue 47 f. enqueue 56. g. the following sequence: dequeue, enqueue 50. h. the following sequence: dequeue, dequeue, enqueue 46, enqueue 50. 50 37 12 14. Starting with an empty priority queue, represented as a heap, draw the heap that results from a. enqueue 25, enqueue 13, enqueue 30, enqueue 10, enqueue 39, enqueue 27 dequeue enqueue 1, enqueue 2, enqueue 3, enqueue 4, enqueue 5, enqueue 6, enqueue 7 dequeue enqueue 7, enqueue 6, enqueue 5, enqueue 4, enqueue 3, enqueue 2, enqueue 1 dequeue enqueue 4, enqueue 2, enqueue6, enqueue 1, enqueue 3, enqueue 5, enqueue 7 dequeue b. e. d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
