Skip to content

Commit b09345d

Browse files
committed
Merge pull request algorithm-visualizer#9 from makintunde/master
Fix typo in Heapsort algorithm
2 parents 7ee3dd3 + 88fe5c4 commit b09345d

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

algorithm/sorting/heap/basic/code.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function heapSort(array, size) {
1616
tracer._select(j);
1717

1818
heapify(array, j, 0);
19-
tracer._print('Swapping elemnts : ' + array[0] + ' & ' + array[j]);
19+
tracer._print('Swapping elements : ' + array[0] + ' & ' + array[j]);
2020

2121
tracer._deselect(j);
2222
}
@@ -44,7 +44,7 @@ function heapify(array, size, root) {
4444

4545
tracer._notify(largest, root);
4646

47-
tracer._print('Swapping elemnts : ' + array[root] + ' & ' + array[largest]);
47+
tracer._print('Swapping elements : ' + array[root] + ' & ' + array[largest]);
4848

4949
heapify(array, size, largest);
5050
}

0 commit comments

Comments
 (0)