Design d-ary heap, analyze insert/extract-min times
Analyze the design d-ary heap, analyze insert/extract-min times.
Examples
Input:"test_input_1"
Output:"output_1"
Input:"test_input_2"
Output:"output_2"
Hints
Recall the structure and properties of a binary heap, and how they differ from a d-ary heap.
Derive the height of a d-ary heap in terms of the number of elements, and analyze how this affects the time complexity of insert and extract-min operations.
Compare the recurrence relations for insert and extract-min in a d-ary heap with those in a binary heap, and solve these recurrences to determine the asymptotic time complexities.
Design d-ary heap, analyze insert/extract-min times
Analyze the design d-ary heap, analyze insert/extract-min times.