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

Commit166b9f6

Browse files
refactor 487
1 parentb3a55bb commit166b9f6

File tree

1 file changed

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

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
packagecom.fishercoder.solutions;
22

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-
*/
163
publicclass_487 {
174

185
publicstaticintfindMaxConsecutiveOnes(int[]nums) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp