Skip to content

Commit b87e326

Browse files
haalogentrekhleb
authored andcommitted
Fix performance measuring code bug (trekhleb#313)
1 parent 8ab965b commit b87e326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/algorithms/sorting/quick-sort/QuickSortInPlace.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class QuickSortInPlace extends Sort{
4646

4747
constpivot=array[highIndex];
4848
// visitingCallback is used for time-complexity analysis.
49-
this.callbacks.visitingCallback(array[pivot]);
49+
this.callbacks.visitingCallback(pivot);
5050

5151
letpartitionIndex=lowIndex;
5252
for(letcurrentIndex=lowIndex;currentIndex<highIndex;currentIndex+=1){

0 commit comments

Comments
(0)