Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose we have a min-ordered heap of size 18, stored in an array starting at index (0 12. At what index is the node that

image text in transcribed

Suppose we have a min-ordered heap of size 18, stored in an array starting at index (0 12. At what index is the node that is the parent of the node stored at index 16? a) 15 b) 8 If we insert a new smallest element, what positions in the array will be modified? 13. a) 18. 9. 4. 2. 1 b) 19. 10, 5, 2,0 14. c) 19.9. 4. 1. 0 d) 18, 8, 3, 1, 0 Suppose that we have a min-ordered heap where the values in the array are [12,17,14,19.25,72,18,31.47]. Where in the array (at what index) is the value 47 after an extract-min operation 15. Consider starting from the same starting heap as the question above (before the extract-min). If we insert the value 13 into the heap, what will its array index be? 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions