Question
A d-heap is a tree with the property that a parents value is smaller than (or equal to) the value of any of its d
A d-heap is a tree with the property that a parents value is smaller than (or equal to) the value of any of its d children. We assume that the d-heap has N elements.
Select all that apply:
a. decreaseKey(p,val), the operation that lowers the value of the item at position p by a positive amount val, costs O(logd N)
b. Building a d-heap with N successive insert operations costs O(logd N)
c. Printing all N elements in order costs O(N logd N)
d. increaseKey(p,val), the operation that increases the value of the item at position p by a positive amount val, costs O(d logd N)
e. inserting a new element costs O(N) in the worst case
f. Printing the second smallest element costs O(N)
Step 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