Skip to content

Commit bf9e301

Browse files
authored
Merge pull request hustcc#14 from lty96117/patch-1
2 parents dcd4745 + 1862c04 commit bf9e301

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)