Consider the following array representing a complete min-heap tree. 8 12 17 24 20 19 28 36 41 22 26 21 33 Suppose we wan
Posted: Fri Jul 01, 2022 5:41 am
Consider the following array representing a complete min-heap tree. 8 12 17 24 20 19 28 36 41 22 26 21 33 Suppose we want to remove the element 24 from this heap. In order to preserve the heap property, a. can we replace this element by the last one in the array? Please fill in the first blank with either yes 42 34 52 47 43 or no. b. Which operation do we apply, a downheap or an upheap? Please fill in the first blank either with downheap or upheap c. Show the array after this deletion operation and heapifying. Please fill in the third blank. When typing the answer only use numbers and comma .i.e, 8, 12, ,.... A A