From 88fe5c4829127f0969ba3167ac776d316450b815 Mon Sep 17 00:00:00 2001 From: ma4413 Date: Sun, 22 May 2016 17:50:42 +0100 Subject: [PATCH] Fix typo in Heapsort algorithm --- algorithm/sorting/heap/basic/code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algorithm/sorting/heap/basic/code.js b/algorithm/sorting/heap/basic/code.js index fbd2e82e..b5cbd997 100644 --- a/algorithm/sorting/heap/basic/code.js +++ b/algorithm/sorting/heap/basic/code.js @@ -15,7 +15,7 @@ function heapSort(array, size) { tracer._select(j); heapify(array, j, 0); - tracer._print('Swapping elemnts : ' + array[0] + ' & ' + array[j]); + tracer._print('Swapping elements : ' + array[0] + ' & ' + array[j]); tracer._deselect(j); } @@ -43,7 +43,7 @@ function heapify(array, size, root) { tracer._notify(largest, root); - tracer._print('Swapping elemnts : ' + array[root] + ' & ' + array[largest]); + tracer._print('Swapping elements : ' + array[root] + ' & ' + array[largest]); heapify(array, size, largest); }