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 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Append and make table queries are called queries. select complex simple action i think action
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
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, 03.11.2019 10:31