Skip to content

Commit f5758d2

Browse files
Lenovo LYGLenovo LYG
authored andcommitted
第四代罗瑶光快排在思想。 20190701 罗瑶光
1 parent fcafb96 commit f5758d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

DP/sortProcessor/Quick_Luoyaoguang_4D.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ private int partition(int[] a, int lp, int rp) {
3838
int x= a[lp]>= a[rp]? a[lp]: a[rp];
3939
int lp1= lp;
4040
while(lp1< rp){//我总觉得这里可以进行一种积分算法优化,我一直在思考,别让那么快想到。
41-
while(a[lp1]<= x&& lp1< rp) {
42-
lp1++;
43-
}
44-
// while(!(a[lp1]>x|| lp1>rp)) {
41+
// while(a[lp1]<= x&& lp1< rp) {
4542
// lp1++;
46-
// }
43+
// }
44+
while(!(a[lp1]>x|| lp1>rp)) {
45+
lp1++;
46+
} //今天想到了一些优化,
4747
while(a[rp]>x){
4848
rp--;
4949
}

0 commit comments

Comments
 (0)