8000 fixed a typo in quickSort · locenco/JS-Sorting-Algorithm@1862c04 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1862c04

Browse files
authored
fixed a typo in quickSort
1 parent dcd4745 commit 1862c04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

6.quickSort.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function swap(arr, i, j) {
6262
arr[i] = arr[j];
6363
arr[j] = temp;
6464
}
65-
functiion paritition2(arr, low, high) {
65+
function partition2(arr, low, high) {
6666
let pivot = arr[low];
6767
while (low < high) {
6868
while (low < high && arr[high] > pivot) {
@@ -80,7 +80,7 @@ functiion paritition2(arr, low, high) {
8080

8181
function quickSort2(arr, low, high) {
8282
if (low < high) {
83-
let pivot = paritition2(arr, low, high);
83+
let pivot = partition2(arr, low, high);
8484
quickSort2(arr, low, pivot - 1);
8585
quickSort2(arr, pivot + 1, high);
8686
}

0 commit comments

Comments
 (0)
0