Computers and Technology
Computers and Technology, 17.12.2019 21:31, Isabe11a

Consider a priority queue has been implemented as a binary max heap and is stored as an array.

80 18 40 13 25

array representation of the heap:

index 0 1 2 3 4 5 6 7 8 9
value 80 18 40 13 5 25 1 2 9
note that -

0th position is left empty

left child of a[ i ] can be found at a[ 2 * i ].

right child of a[ i ] can be found at a[ 2 * i + 1 ].

the parent of a[ i ] is at a[ i / 2 ].

now a pop-heap operation is called on this data structure. what will be the array after this pop?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, jahi1201
Ahorse is how much percent more powerful than a pony
Answers: 1
image
Computers and Technology, 22.06.2019 14:30, qxchung7310
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
image
Computers and Technology, 22.06.2019 19:30, bstine6678
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
image
Computers and Technology, 23.06.2019 15:20, headshotplayzcod
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
Do you know the correct answer?
Consider a priority queue has been implemented as a binary max heap and is stored as an array.
...

Questions in other subjects:

Konu
Mathematics, 06.04.2020 19:29