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
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #16 | 100 | 11/3/2024 |
| Try #15 | 100 | 11/3/2024 |
| Try #14 | 100 | 11/3/2024 |
| Try #13 | 0 | 11/3/2024 |
| Try #12 | 0 | 11/3/2024 |
| Try #11 | 0 | 11/3/2024 |
| Try #10 | 0 | 11/3/2024 |
| Try #9 | 0 | 11/3/2024 |
| Try #8 | 100 | 11/3/2024 |
| Try #7 | 0 | 11/3/2024 |
| Try #6 | 0 | 11/3/2024 |
| Try #5 | 0 | 11/3/2024 |
| Try #4 | 0 | 11/3/2024 |
| Try #3 | 0 | 11/3/2024 |
| Try #2 | 0 | 11/3/2024 |
| Try #1 | 0 | 11/3/2024 |