We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b977c1f commit f310721Copy full SHA for f310721
Brute Force/Heapsort/code.js
@@ -16,7 +16,7 @@ function heapSort(array, size) {
16
let j;
17
let temp;
18
19
- for (i = Math.ceil(size / 2) - 1; i >= 0; i--) {
+ for (i = Math.floor(size / 2) - 1; i >= 0; i--) {
20
heapify(array, size, i);
21
}
22
0 commit comments