algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

heap siftUp is wrong

Open Rui-L opened this issue 8 years ago • 1 comments

should be (i-1) >> 1 https://github.com/arnauddri/algorithms/blob/master/data-structures/heap/heap.go#L81

Rui-L avatar Jan 21 '17 10:01 Rui-L

And finish for i > 0 && parent > 0;

shengzhch avatar Oct 10 '18 01:10 shengzhch