subject

Given an array of numbers A={7,2,3,5, 1, 6, 12, 18,4}. Answer the following questions using algorithms given below: (a) Build the array into a max-heap, following the build-max-heap algorithm. Show each intermediate step and the binary tree representation of your final result. BUILD-MAX-HEAP(A) A. heap-size = A. length for i = LAmh_down to 1 de MAX-HEAPIFYA, 1) MAX-HEAPIFY (A, 11 1 = LEFT) r = RIGHT() ifs A. heap-size and A[4] >A[ largest - else largest ai ifrs A. heap-size and A[r] > A[largest] largest er if largest i exchange A[n] and A[largest] MAX-HEAPIFYA, largest)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Your mom wants to purchase a laptop computer. she said she wants her new computer to be able to play her dvds so she can listen to music and wants to know what type of optical drives will play her disk. which type of drive should she look for?
Answers: 1
You know the right answer?
Given an array of numbers A={7,2,3,5, 1, 6, 12, 18,4}. Answer the following questions using algorith...
Questions
question
Mathematics, 11.07.2019 13:30
question
Mathematics, 11.07.2019 13:30
question
Geography, 11.07.2019 13:30
Questions on the website: 13722362