Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5758d2

Browse files
Lenovo LYGLenovo LYG
Lenovo LYG
authored and
Lenovo LYG
committed
第四代罗瑶光快排在思想。 20190701 罗瑶光
1 parentfcafb96 commitf5758d2

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
intx=a[lp]>=a[rp]?a[lp]:a[rp];
3939
intlp1=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)

[8]ページ先頭

©2009-2025 Movatter.jp