Please explain the bug in the buildHeap code below. Show a corrected version of the code along with a brief explanation
Posted: Fri May 20, 2022 4:59 pm
Please explain the bug in the buildHeap code below. Show a
corrected version of the code along with a brief explanation of
what was wrong.
PLZ And THX
private void buildHeap() { for (int i = 1; i < currentSize/2; i++) { percolate Down(i); }
corrected version of the code along with a brief explanation of
what was wrong.
PLZ And THX
private void buildHeap() { for (int i = 1; i < currentSize/2; i++) { percolate Down(i); }