From b87e326fcf22f8cbdaf04ad3ed526b75a6b166bc Mon Sep 17 00:00:00 2001 From: haalogen Date: Fri, 8 Mar 2019 14:08:18 +0300 Subject: [PATCH] Fix performance measuring code bug (#313) --- src/algorithms/sorting/quick-sort/QuickSortInPlace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/sorting/quick-sort/QuickSortInPlace.js b/src/algorithms/sorting/quick-sort/QuickSortInPlace.js index 8bc67577..cc1f5e50 100644 --- a/src/algorithms/sorting/quick-sort/QuickSortInPlace.js +++ b/src/algorithms/sorting/quick-sort/QuickSortInPlace.js @@ -46,7 +46,7 @@ export default class QuickSortInPlace extends Sort { const pivot = array[highIndex]; // visitingCallback is used for time-complexity analysis. - this.callbacks.visitingCallback(array[pivot]); + this.callbacks.visitingCallback(pivot); let partitionIndex = lowIndex; for (let currentIndex = lowIndex; currentIndex < highIndex; currentIndex += 1) {