Now that you've simulated and simulated the down heapify algorithm on an example
and you've seen what the code looks like, tell me what the running time of down heapify
would be if you have the heap of size n where the top node might be
violating the heap property but it satisfied everyone else.
We run down heapify on this and re-establish the heap property and it takes how long?
अब है कि आप और नकली नकली है डाउन heapify एक उदाहरण पर एल्गोरिथ्म
और आप क्या कोड लग रहा है जैसे मुझे बताओ कि क्या के समय नीचे चल रहा heapify, देखा है
यदि आप आकार एन के ढेर है जहां शीर्ष नोड हो सकता है किया जाएगा
का उल्लंघन करने के ढेर संपत्ति लेकिन यह हर कोई संतुष्ट।
हम नीचे चला इस पर heapify और ढेर गुण फिर से स्थापित है और यह कैसे लंबे समय लेता है?
down_heapifyのアルゴリズムの
シミュレーションを手書きしました
それではdown_heapifyの実行時間は
どれぐらいになるでしょうか
ヒープの大きさはnで一番上のノードを除いて
他はヒープのプロパティを満たしています
down_heapifyを実行し
ヒープのプロパティの再確立に要する時間を求めます