binary search tree - from where we need to start in max-heapify algorithm? -



binary search tree - from where we need to start in max-heapify algorithm? -

i need no have way apply max-heapify algorithm?do have apply bottom top or top bottom?or can apply places heap property not there? when going maintain heap property in tree.

can body help?

i not able question absolutely think uncertainty whether moving top bottom or bottom top. in heapify move top node(i) bottom(leaf nodes), , seek maintain heap property move. a: array left , right children of root heaps, i: array index have @ resource. http://homepages.ius.edu/rwisman/c455/html/notes/chapter6/heapify.htm see pdf more details. http://courses.csail.mit.edu/6.006/fall10/handouts/recitation10-8.pdf

hope clears doubt.

algorithm binary-search-tree heapsort max-heap

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -