Max Consecutive Ones III #leetcode #leetcode75

preview_player
Показать описание
Explaining how to solve LeetCode 1004 - Max Consecutive Ones III in Python!

@0:59 - Example + Explanation
@1:23 - Code
@4:35 - Code Walkthrough with Example
@8:23 - Time and Space Complexity

Music: Bensound

Lemme know if you have any comments or questions!:)))

Socials:

Playlists:

Рекомендации по теме
Комментарии
Автор

I was doing this problem and couldn't figure it out. Glad you uploaded the solution today and I really like the way you walk us through your solution step by step. Kudos for doing this!

hantunlin
Автор

Just a quick thought :-
if you put that end+=1 on top of max_ones
you dont need to +1 inside the max()
just (end - start) is enough

zac
Автор

instead of the second while loop we could do "if" cuz we're at most running it once.

amusicated