Spring 2022 1. a). (10 points) A priority queue containing integers is implemented as a heap stored in an array. The pre
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Spring 2022 1. a). (10 points) A priority queue containing integers is implemented as a heap stored in an array. The pre
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