Skip to content

Commit 433dbb8

Browse files
committed
Merge pull request algorithm-visualizer#40 from elliottcf/patch-1
Make heapSort accept any array length
2 parents 410dfa1 + 2e42244 commit 433dbb8

File tree

1 file changed

+1
-1
lines changed
  • algorithm/sorting/heap/basic

1 file changed

+1
-1
lines changed

algorithm/sorting/heap/basic/code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ function heapify(array, size, root) {
5353
tracer._sleep(1000);
5454
tracer._pace(800);
5555

56-
heapSort(D, 10);
56+
heapSort(D, D.length);
5757

5858
tracer._print('Final array = [' + D.join(', ') + ']');

0 commit comments

Comments
 (0)