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

Commit2dbfc5d

Browse files
committed
Fix quick select return values
1 parent129de26 commit2dbfc5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/searching/quickselect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
if(arr.length<=n){
44-
returnNaN;
44+
returnundefined;
4545
}
4646
lo=lo||0;
4747
hi=hi||arr.length-1;
@@ -60,7 +60,7 @@
6060
lo=pivotIdx+1;
6161
}
6262
}
63-
returnNaN;
63+
returnundefined;
6464
}
6565
exports.quickselect=quickselect;
6666

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp