Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Max Consecutive Ones III
Bookmark
Input
Example 1
Example 2
All ones
All zeros
Custom
nums
=
[1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0]
,
k
=
2
1
1
1
0
0
0
1
1
1
1
0
zerosCount = 0
maxLen = 0
algo
master
.
io
Step:
Start of algorithm
0 / 42
Input
Example 1
Example 2
All ones
All zeros
Custom
nums
=
[1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0]
,
k
=
2
0 / 42
1
1
1
0
0
0
1
1
1
1
0
zerosCount = 0
maxLen = 0
algo
master
.
io
Step:
Start of algorithm