subject
Computers and Technology, 16.06.2020 18:57 jada741

Consider the following operations on an initially empty heap h; this heap is a maxheap, so the biggest item is at the top. The heap is represented as a binary tree: h. insert(5); h. insert(6); h. insert(0); h. insert(3); h. insert(10); h. insert(1); int item; h. remove(item); // Removes the biggest item from the heap, and puts it in item h. insert(9); h. insert(7); h. remove(item); a. Show the resulting heap (As in problem la, show the tree in some recognizable form.)
b. Show how your heap from part a would be represented in an array.
c. After executing h. remove(item); one more time, show the array that results.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Alook-up table used to convert pixel values to output values on a monitor. essentially, all pixels with a value of 190 or above are shown as white (i.e. 255), and all values with a value of 63 or less are shown as black (i.e. 0). in between the pixels are scaled so that a pixel with a value p is converted to a pixel of value 2/127 −+3969). if a pixel has a value of 170 originally, what value will be used to display the pixel on the monitor? if a value of 110 is used to display the pixel on the monitor, what was the original value of the pixel?
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
Businesses allocate resources for their best and most productive uses. the more a resource, the more costly it will be. a manufacturer that requires scarce and costly resources is likely to charge for its products.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
You know the right answer?
Consider the following operations on an initially empty heap h; this heap is a maxheap, so the bigge...
Questions
question
Chemistry, 26.11.2021 02:40
question
Mathematics, 26.11.2021 02:40
Questions on the website: 13722367