Skip to content

Commit cdae2b9

Browse files
authored
[U] 更新双路快排bug
1 parent 9620fb4 commit cdae2b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

notes/algorithms/快速排序算法.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public class QuickSort2Ways {
193193
while(i <= right && arr[i] < p) {
194194
i++;
195195
}
196-
while(j >= 0 && arr[j] > p) {
196+
while(j >= left + 1 && arr[j] > p) {
197197
j--;
198198
}
199199

0 commit comments

Comments
 (0)