subject
Engineering, 15.04.2020 15:37 hiene

Given the following sequence of integers12, 19, 10, 4, 23, 7, 45, 8, 15a) Build a max-heap by inserting the above set in the given sequence. Show the heap after every insertion. How many comparisons in all did it take to build the heap?b) On the heap constructed in part (a), perform successive delete_max operations. Show the heap after every delete_max. How many comparisons did it take in all to delete all the entries from the heap?c) The above two steps essentially sort a set of entries, The total number of comparisons for both steps is the number of comparisons required to sort the set. Compare this with the selection sort algorithm, which was discussed in the context of the quadratic running time order. How man comparisons does selection sort make on the above set?

ansver
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, hadellolo8839
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, meganwintergirl
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
image
Engineering, 04.07.2019 18:10, leomessifanboy678
The filament of an incandescent lamp has a temperature of 2000k. calculate the fraction of radiation emitted in the visible light band if the filament is approximated as blackbody
Answers: 2
image
Engineering, 04.07.2019 18:10, selenamr
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed. gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
You know the right answer?
Given the following sequence of integers12, 19, 10, 4, 23, 7, 45, 8, 15a) Build a max-heap by insert...

Questions in other subjects:

Konu
Mathematics, 05.05.2020 19:01