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, 21.06.2019 21:30
Apower user needs you to install a second type of operating system on his computer to increase efficiency while running some specialized software programs. which installation technique should you use?
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
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
Mathematics, 03.02.2022 14:30
Questions on the website: 13722363