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, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
question
Computers and Technology, 24.06.2019 00:50
Which of the following is not a key player in the sale of travel products?
Answers: 2
You know the right answer?
Consider the following operations on an initially empty heap h; this heap is a maxheap, so the bigge...
Questions