Max Consecutive Ones III

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 5

  • @hantunlin7392
    @hantunlin7392 Місяць тому +1

    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!

  • @zac5060
    @zac5060 Місяць тому

    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

  • @deepakjyoti8355
    @deepakjyoti8355 Місяць тому

    ❤your videos.

  • @sanooosai
    @sanooosai Місяць тому

    great thank you

  • @amusicated
    @amusicated Місяць тому

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