Skip to content

Commit b730089

Browse files
refactor 605
1 parent ea99018 commit b730089

File tree

1 file changed

+0
-23
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-23
lines changed

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

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 605. Can Place Flowers
5-
*
6-
* Suppose you have a long flowerbed in which some of the plots are planted and some are not.
7-
* However, flowers cannot be planted in adjacent plots - they would compete for water and both would die.
8-
9-
Given a flowerbed (represented as an array containing 0 and 1, where 0 means empty and 1 means not empty),
10-
and a number n, return if n new flowers can be planted in it without violating the no-adjacent-flowers rule.
11-
12-
Example 1:
13-
Input: flowerbed = [1,0,0,0,1], n = 1
14-
Output: True
15-
16-
Example 2:
17-
Input: flowerbed = [1,0,0,0,1], n = 2
18-
Output: False
19-
20-
Note:
21-
The input array won't violate no-adjacent-flowers rule.
22-
The input array size is in the range of [1, 20000].
23-
n is a non-negative integer which won't exceed the input array size.
24-
25-
*/
263
public class _605 {
274

285
public static class Solution1 {

0 commit comments

Comments
 (0)