Page 1 of 1

Spring 2022 1. a). (10 points) A priority queue containing integers is implemented as a heap stored in an array. The pre

Posted: Fri May 20, 2022 3:45 pm
by answerhappygod
Spring 2022 1 A 10 Points A Priority Queue Containing Integers Is Implemented As A Heap Stored In An Array The Pre 1
Spring 2022 1 A 10 Points A Priority Queue Containing Integers Is Implemented As A Heap Stored In An Array The Pre 1 (1.05 MiB) Viewed 25 times
plz answer both parts
Spring 2022 1. a). (10 points) A priority queue containing integers is implemented as a heap stored in an array. The precondition stated that this priority queue cannot contain duplicate elements. There are 15 elements currently in the priority queue. What values might be stored in array positions 12, 13, and 18 so that properties of a heap will be satisfied? HIIH[2]H[3]H[4]H[5] H[6] 27 11 18 10 17 H[7]H[8]H[9]H[10]H 15 5 8 3 4 H[12] H[13]H[14]H[15][16]H[17] H[18] ? 12 9 2 1 ? 6 ? b). (10 points) Delete 98 from the following splay tree. Show step-by-step results. SO 80 95 DO 99 70 90 98 65 67