A k-ary heap is similar to a binary heap, but non-leaf nodeshave k children instead of 2 children.
1. Write the formula to get the children of a node i and theparent of a node i.
2. What is the height of a k-ary heap, write it in terms of kand n.
3. Modify the binary heap functions Heapify, Extract, IncreaseKey and Insert to work on a k-ary heap.(Provide the pseudocode).
4. Provide the runtime of your algorithms.
5. What are the cases when it is better to use a k-ary heap thana binary heap.
Expert Answer
An answer will be send to you
PayPal Gateway not configured
PayPal Gateway not configured