資料結構›Ch7 搜尋與排序第 7 題/共 76 題
7. Heap建構、攤還分析、Dynamic Array
#DS-07-007中Heap建構攤還分析Dynamic Array
(10%) Construct a max-oriented heap by inserting the keys E, A, S, Y, Q, U, E, S, T, I, O, N into an initially empty heap in the given order. Provide the final heap represented as an array after all the keys have been inserted.
(5%) Determine the time complexity of inserting an element into a max-oriented heap. Specifically, analyze the insertion process, considering how the heap property is maintained after the insertion.
(5%) Determine the amortized time complexity of inserting an element in to the max-oriented heap when a resized array is used. Assume the following resizing rule: when the array becomes full, it is resized by doubling its current size.
📄 台大114
▤完整推導請見《WH 資工筆記 · 資料結構》Ch7 搜尋與排序