The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
You are given the sequence(attached) Compute a max-heap by sequentially inserting A[1], A[2], . . . , A[9] into the originally empty max-heap. Show the resulting heap in array format (as attached)
Â
You are given the max-heap (attached) Now apply Extract − M ax(A) to the above heap.• List all element-wise comparisons in the corresponding order made by this application.You need to write each comparison in the formX > Y?Separate two consecutive comparisons with a comma.• Show the resulting max-heap in its array form (as in the above)
Â
Â
(10 pts) You are given the max—heap
|r1° H1 2 3 4‘5 6 7 8‘9‘10 11 12 13 14 15 16‘ A[i]90807607065203040504 3 2 1 10
Now apply Extract — M (123(A) to the above heap. 0 List all element—wise comparisons in the corresponding order made by this application. You need to write each comparison in the form
X > Y? Separate two consecutive comparisons with a comma. 0 Show the resulting max—heap in its array form (as in the above).
(5 pts) You are given the sequence8 1 2 3 4 5
"III-Mg Compute a max—heap by sequentially inserting A[1],A[2], . . . ,A[9] into the originally empty max—heap. Show the resulting heap in array format (as in the above).
-----------