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 a48fd45 commit dd20087Copy full SHA for dd20087
src/main/java/com/fishercoder/solutions/_485.java
@@ -1,20 +1,5 @@
1
package com.fishercoder.solutions;
2
3
-/**
4
- * 485. Max Consecutive Ones
5
- *
6
- * Given a binary array, find the maximum number of consecutive 1s in this array.
7
8
- * Example 1:
9
10
- * Input: [1,1,0,1,1,1]
11
- * Output: 3
12
- * Explanation: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3.
13
14
- * Note:
15
- * The input array will only contain 0 and 1.
16
- * The length of input array is a positive integer and will not exceed 10,000
17
- * */
18
public class _485 {
19
public static class Solution1 {
20
public int findMaxConsecutiveOnes(int[] nums) {
0 commit comments