(a) Consider a heap stored in an array a= [25, 17, 23, 14, 8, 21, 12, 7]. Write the updated array when we apply extractMax operation. (b) Consider the same heap a = [25, 17, 23, 14, 8, 21, 12, 7]. Write the updated array when we apply the operation insert (24). (c) Specify the best-case running time of extractMax() in a heap formed by n distinct items. If your answer is e(f(n)), you must provide an example, with large n, for which extractMax() takes (f(n)).
(a) Consider a heap stored in an array a= [25, 17, 23, 14, 8, 21, 12, 7]. Write the updated array when we apply extractMax operation. (b) Consider the same heap a = [25, 17, 23, 14, 8, 21, 12, 7]. Write the updated array when we apply the operation insert (24). (c) Specify the best-case running time of extractMax() in a heap formed by n distinct items. If your answer is e(f(n)), you must provide an example, with large n, for which extractMax() takes (f(n)).
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 7 steps with 2 images