Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can I have it in C++ please? I know it's been already solve, just trying to see a different way of solving it. Don't use
Can I have it in C++ please? I know it's been already solve, just trying to see a different way of solving it. Don't use the C++ online compiler please.
Consider the following set of elements: 23, 53, 64, 5, 87, 32, 50, 90, 14, 41 b. Implement the above min-heap structure using an array representation as described in class. c. Visit the different array elements in part b and print the index and value of the parent and children of each element visited. Use the formulas for finding the index of the children and parent as presented in class. d. Implement the code for inserting the values 44, and then 20 into the min-heap. e. Select a random integer in the range [0, array_size-1]. Delete the heap element at that heap index and apply the necessary steps to maintain the min-heap property. f. Increase the value of the root element to 25. Apply the necessary steps in code to maintain the min-heap property. g. Change the value of the element with value 50 to 0. Apply the necessary steps in code to maintain the min-heap property. h. Implement the delete-min algorithm on the heap. i. Recursively apply the delete-min algorithm to sort the elements of the heap. j. Do some research to list some application domains that uses heap data structures in theirStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started