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

Commit01c15fd

Browse files
committed
Removal of unnecessary code for JS problem 74
1 parentcefd087 commit01c15fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎javascript/74-Search-A-2D-Matrix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function searchMatrix(matrix, target) {
1313
constwidth=matrix[0].length;
1414
constheight=matrix.length;
1515
leti=0;
16-
letj=(height-1)*width+width-1;
16+
letj=height*width-1;
1717

1818
while(i<=j){
1919
constm=Math.floor((i+j)/2);
@@ -91,4 +91,4 @@ function searchMatrix(matrix, target) {
9191
*/
9292
functiontop(arr){
9393
returnarr[arr.length-1];
94-
}
94+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp