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

Commit4884f70

Browse files
refactor 605
1 parent9645327 commit4884f70

File tree

1 file changed

+2
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+2
-1
lines changed

‎src/main/java/com/fishercoder/solutions/_605.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public boolean canPlaceFlowers(int[] flowerbed, int n) {
3939
for (inti =1;i <len -1;i++) {
4040
if (flowerbed[i] ==0 &&flowerbed[i -1] ==0 &&flowerbed[i +1] ==0) {
4141
n--;
42-
flowerbed[i] =1;//modify the input, discuss this with interviwer, if not allowed, then have a copy of this input and modify copy
42+
//modify the input, discuss this with interviwer, if not allowed, then have a copy of this input and modify copy
43+
flowerbed[i] =1;
4344
}
4445
if (n <=0) {
4546
returntrue;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp