mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-25 06:16:11 +08:00
Fix performance measuring code bug (#313)
This commit is contained in:
parent
8ab965b483
commit
b87e326fcf
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user