Max Consecutive Ones | Leetcode

preview_player
Показать описание

Find DSA, LLD, OOPs, Core Subjects, 1000+ Premium Questions company wise, Aptitude, SQL, AI doubt support and many other features that will help you to stay focussed inside one platform under one affordable subscription. Have a hassle free one stop solution for up-skilling and preparing.

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

Do leave a comment if you get the solution :) helps me a lot


Instagram: striver_79

takeUforward
Автор

I solved 400+ problems on leetcode but still watching this easy one problem because of you striver.. ✌

willturner
Автор

i thought of same logic, but was scared to code it. watched ur video till 2min 53s and got confidence to try coding it myself and i can tell i feel good. Still beginner in dsa! Thank you TUF!

NiranjanKumar-yjmn
Автор

I had solved this question already in leetcode but still saw your video because I just like to watch your videos even if I know the video content already.

ishanshah
Автор

Your explanation is way smoother that any one can imagine 💥💥🙏💯💥

roushanraj
Автор

A wonderful and simple explanation. Thanks man!

mikedelta
Автор

Bhai. You are a Farishta for a Tier 3 Student. I started loving DSA just because of you.

jatingarg
Автор

Thank you bhya, for making videos for us, we all love you 💓💓💯💯💯

roushanraj
Автор

This problem is pretty easy as compared to other problems of this day and even before this day, and it doesn't even use 2 pointer approach, so why categorize this in this category.

gauravtripathi
Автор

I copied line by line the code you wrote .! Still its showing runtime error .. Can you please explain why this is happening

HarshGupta-gr
Автор

ok so, shouldn t you put another maxi = max (maxi, cnt); before cnt = 0;? or otherwise you will lose the count at the first number that s not 1?

razvanpetrisor
Автор

The gfg link in DSA sheet is not the exact problem. Please have a look sir and please upload a solution for that problem

upendrabandi
Автор

Nice explanation your videos are really good...please keep on making such videos.

paragroy
Автор

I have performed the exactly same code on leetcode without even watching solution. Runtime: 84 ms, faster than 36.73% of C++ online submissions for Max Consecutive Ones. But why 36.73 ? I don't think this could be optimized to O(1) or O(log n)

palakmittal
Автор

UNDERSTOOD...!!!
Thanks striver for the video... :)

ranasauravsingh
Автор

Great tutorial, helped a lot! Thank You!

quervy
Автор

I did it by two pointer, same thing however

shreyasingh
Автор

The problem is very similar to max subarray... actually as I started watching I remembered there's a question similar to kadane's algo

adityamahimkar
Автор

I am able to figure out the logic of such questions but unable to write the code structure being a beginnner. anyone else facing this problem

pranav
Автор

I thought he'd use bit manipulation

devprakash
visit shbcf.ru