Data Structured57_q2_kheap

K-Ary Heap

c3afa87d-250d-4fe9-a33b-97b2e8b1645f.cppC++
1// Loading code...

Selected Submission

100 / 100
0.013s
1816 KB
HeapArray
Time Comp.
O(log K * n) for heap operations (fixUp, fixDown) where n is the number of elements in the heap and K is the arity.
Space Comp.
O(n)
Readability
7/10

"The code implements a K-ary heap (a type of heap). It includes `fixUp` and `fixDown` methods which are core to maintaining the heap property, and uses a vector to store the heap elements. The template structure suggests it's designed for generic types and comparison functions."

History

AttemptPoints Time
Try #1610011/3/2024
Try #1510011/3/2024
Try #1410011/3/2024
Try #13011/3/2024
Try #12011/3/2024
Try #11011/3/2024
Try #10011/3/2024
Try #9011/3/2024
Try #810011/3/2024
Try #7011/3/2024
Try #6011/3/2024
Try #5011/3/2024
Try #4011/3/2024
Try #3011/3/2024
Try #2011/3/2024
Try #1011/3/2024