make-github-pseudonymous-again/js-data-structures

O(n) makeheap

make-github-pseudonymous-again opened this issue · 1 comments

// >= 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 ) ;
}