485. Max Consecutive Ones
Easy
Given a binary array nums
, return the maximum number of consecutive 1
's in the array.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 105
nums[i]
is either0
or1
.
解題
Last updated
Easy
Given a binary array nums
, return the maximum number of consecutive 1
's in the array.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 105
nums[i]
is either 0
or 1
.
Last updated