We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3a55bb commit 166b9f6Copy full SHA for 166b9f6
src/main/java/com/fishercoder/solutions/_487.java
@@ -1,18 +1,5 @@
1
package com.fishercoder.solutions;
2
3
-/**
4
- * Given a binary array, find the maximum number of consecutive 1s in this array.
5
-
6
- Example 1:
7
- Input: [1,1,0,1,1,1]
8
- Output: 3
9
- Explanation: The first two digits or the last three digits are consecutive 1s.
10
- The maximum number of consecutive 1s is 3.
11
- Note:
12
13
- The input array will only contain 0 and 1.
14
- The length of input array is a positive integer and will not exceed 10,000
15
- */
16
public class _487 {
17
18
public static int findMaxConsecutiveOnes(int[] nums) {
0 commit comments