You are given a binary array nums (an array that contains only 0s and 1s). Your task is to find the maximum number of consecutive 1s in the array and return it.
Constraints
...
⋮
Tap here to switch tabs
Problem
Ask
Submissions
Solution
Solution: Max Consecutive Ones
Statement▼
You are given a binary array nums (an array that contains only 0s and 1s). Your task is to find the maximum number of consecutive 1s in the array and return it.