O(n) makeheap
make-github-pseudonymous-again opened this issue · 1 comments
make-github-pseudonymous-again commented
// >= 0 is necessary when arity = 1 and n = 0
for ( k = ( n + arity - 2 ) / arity | 0 ; k-- >= 0 ; ) {
siftdown( arity , compare , swap , a , 0 , n , k ) ;
}
make-github-pseudonymous-again commented
migrated to heap-data-structure/about#9