Largest Subarray with 0 Sum | Hashmap & Heaps | Data Structure & Algorithms

  Рет қаралды 38,721

Pepcoding

Pepcoding

Күн бұрын

Пікірлер: 79
@satyamgupta6030
@satyamgupta6030 Жыл бұрын
sir I can't believe seriously how can someone teach so so well. I have watched videos of other popular youtubers as well but no one comes even close to you. hats off. since pepcoding is bought by scaler I'll always miss your teachings.
@astuteToddler
@astuteToddler 2 жыл бұрын
after putting (0,-1) we dont require to check if the element is 0 itself, which is done in another videos. It makes thing more complicated whereas this trick is great and simplifies everything. Thanks a lot for it!
@ommapari
@ommapari 2 жыл бұрын
Yes they way, it makes soluation more simpler
@alfiyazahra4680
@alfiyazahra4680 3 жыл бұрын
8:52 kaise samjh nhi aaiga sir aap itna achha samjhate hai just clearing all my doubts and strengthening my basics
@ankitagrawal3468
@ankitagrawal3468 3 жыл бұрын
all good, keep it up. just try to add complexity as well since it is a very important aspect. and alternate efficient solutions
@cassiuskamdyn4413
@cassiuskamdyn4413 3 жыл бұрын
instablaster.
@aman6561
@aman6561 4 жыл бұрын
Blkl smjh aara hai Sr, Dosto ko bhi btaya hai unhe bhi mza ara hai, Bs aap aise hi bnaate rhie sr videos.
@Pepcoding
@Pepcoding 4 жыл бұрын
Padhte rahie. Aj dobara shuru ho gya hun, thoda thak gya tha. Ab dobara shuru hai.
@aashishgoyal1436
@aashishgoyal1436 4 жыл бұрын
@@Pepcoding thank u sir for ur dedication. ur videos and teaching style is really unique and helpful
@aman6561
@aman6561 4 жыл бұрын
@@Pepcoding tbyt ka bhi dhyaan rkhe sr apni.
@Pepcoding
@Pepcoding 4 жыл бұрын
@@aman6561 cough and cold
@aman6561
@aman6561 4 жыл бұрын
@@Pepcoding You’re stronger than all of us. I’m praying for you
@vatanprakash8742
@vatanprakash8742 Жыл бұрын
i don't have words for your explanation sir thank you very much
@KamalKumar-bk6rn
@KamalKumar-bk6rn Жыл бұрын
Thank you @Pepcoding that was a clear explanation
@yogeshrawat1204
@yogeshrawat1204 3 жыл бұрын
Best tutorial... Respect++++❤
@whoCares198
@whoCares198 2 жыл бұрын
The Best explanation till date
@lodhiyavishnu4714
@lodhiyavishnu4714 2 жыл бұрын
What a logic simple and clear thank you sir.
@alfiyazahra4680
@alfiyazahra4680 3 жыл бұрын
15:17 bhut acche se samjh aaya sir thank u so much
@_HarshitSharma
@_HarshitSharma 2 жыл бұрын
Zabardast Explanation, sir...Thank you :)
@atanumazumder4162
@atanumazumder4162 2 жыл бұрын
Great explanation. Thank you
@snehakumaribhadani8460
@snehakumaribhadani8460 2 жыл бұрын
thankyou so much sir for this best content & your explaination is awsome 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
@ibrahimshaikh3642
@ibrahimshaikh3642 3 жыл бұрын
Maza aaya , Thank u Sumit , good explanation
@YasirShabbirChoudhary
@YasirShabbirChoudhary 2 жыл бұрын
Very well explained
@sachinbharti3016
@sachinbharti3016 7 ай бұрын
Great explain sir
@SumitSingh-ui4do
@SumitSingh-ui4do 2 жыл бұрын
Huge respect for all
@Pepcoding
@Pepcoding 2 жыл бұрын
Thanks a ton. Keep learning. And for better experience and well organised content explore nados.pepcoding.com
@vivekmalviya3036
@vivekmalviya3036 6 ай бұрын
Thank u sir ❤❤❤
@ADITIDANA
@ADITIDANA Жыл бұрын
great explanation👍
@anshumanpanda8887
@anshumanpanda8887 2 жыл бұрын
at index i=0 the sum will always be equal to the element present at i=0. So instead of i=-1,and sum =0. We can store sum =ar[0] and start the loop like for(int i=1;i
@ajeetworking
@ajeetworking 3 жыл бұрын
thanks, Sumit Bhai...best explanation.
@Pepcoding
@Pepcoding 3 жыл бұрын
I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@harshitsharma1880
@harshitsharma1880 3 жыл бұрын
best explanation sir......
@Pepcoding
@Pepcoding 3 жыл бұрын
Thanks and welcome Keep watching
@sudhanshuuniyal5737
@sudhanshuuniyal5737 2 жыл бұрын
nice explanation
@saptadeepdas1188
@saptadeepdas1188 3 ай бұрын
He is the only dsa guy who gets anxiety if his students do not understand .
@ajinkyasawadkar5741
@ajinkyasawadkar5741 2 жыл бұрын
well explained
@shashibarnwaldavmo
@shashibarnwaldavmo 2 жыл бұрын
good explanation, keep it up
@aashishgoyal1436
@aashishgoyal1436 4 жыл бұрын
mazzaa aagya sir. Thanks a lot
@Pepcoding
@Pepcoding 4 жыл бұрын
So nice of you
@adityakotwal35
@adityakotwal35 3 жыл бұрын
excellent😄
@AdityaKumar-eb5fd
@AdityaKumar-eb5fd 3 жыл бұрын
very good explaination
@Pepcoding
@Pepcoding 3 жыл бұрын
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@adarshsrivastava3657
@adarshsrivastava3657 Жыл бұрын
thnx sir
@varunmanchanda3972
@varunmanchanda3972 4 жыл бұрын
Sir, I have just observed one thing that mostly "subarray" questions are solvable using Hashmap, is it true somewhere, or Intuition changes over questions?
@Pepcoding
@Pepcoding 4 жыл бұрын
beta, safe assumption hai.
@varunmanchanda3972
@varunmanchanda3972 4 жыл бұрын
@@Pepcoding Sir, while solving questions by this technique, I thought can we solve these questions using divide and conquer because subproblem is of same type of we divide our whole big problem?
@rohitshirur7640
@rohitshirur7640 3 жыл бұрын
@@varunmanchanda3972 in some of problems we use window sliding technique
@tanujarora4906
@tanujarora4906 Жыл бұрын
Sliding Window, Prefix sums and Hashing three approaches are most common
@mahboobhasan2137
@mahboobhasan2137 2 жыл бұрын
thanks for this video sir
@Pepcoding
@Pepcoding 2 жыл бұрын
Keep learning. And for better experience, visit nados.io, where you will get well curated content and career opportunities.
@rajveerr795
@rajveerr795 3 жыл бұрын
great explanation sir,res++;
@Pepcoding
@Pepcoding 3 жыл бұрын
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@swapnilkarwa2790
@swapnilkarwa2790 3 ай бұрын
What is leetcode question number ?
@tanishkumar6682
@tanishkumar6682 Жыл бұрын
understood
@rakeshkumaryadav1117
@rakeshkumaryadav1117 2 жыл бұрын
what will be the output of the arr[]=-1 1 -1 1 as per code its coming 2 but correct ans is 4
@vasudhatapriya6315
@vasudhatapriya6315 2 жыл бұрын
Yes!
@vasudhatapriya6315
@vasudhatapriya6315 2 жыл бұрын
@Pepcoding
@Pepcoding
@Pepcoding 2 жыл бұрын
Sign up on nados.io and post such queries on community section of NADOS.
@shivanshyadu4830
@shivanshyadu4830 2 жыл бұрын
ya bro same problem here ? have you solved it?? please reply me!!!
@ashishkumaryadav5252
@ashishkumaryadav5252 2 жыл бұрын
Just add these two lines and it will pass all test cases like this: if(A[i]==0) ans = max(ans, i+1);
@kaushalmore5773
@kaushalmore5773 2 жыл бұрын
thanks
@Pepcoding
@Pepcoding 2 жыл бұрын
Always welcome. For much better experience and precisely arranged content visit on nados.io
@Aayush5ri
@Aayush5ri 3 жыл бұрын
Isme heaps Kahan use ho rahi hai ? Good explanation though !!
@mishra1576
@mishra1576 3 жыл бұрын
Hashmap use ho rha hai
@jasmeenkaur6001
@jasmeenkaur6001 3 жыл бұрын
get is inbuilt func???? in java hashmap instead of java what should i use in c++??
@Pepcoding
@Pepcoding 3 жыл бұрын
In cpp there is unordered map
@AbhishekKumar-hi8oj
@AbhishekKumar-hi8oj 4 жыл бұрын
Nice.
@Pepcoding
@Pepcoding 4 жыл бұрын
Thankyou! Keep learning and keep supporting😊
@rohitshinde8478
@rohitshinde8478 3 жыл бұрын
Thank you sir very mush
@govindsinghshekhawat8533
@govindsinghshekhawat8533 2 жыл бұрын
Can someone tell me how to approach LONGEST SUBSEQUENCE with 0 SUM please. Could this be solved using hashmaps ?
@Pepcoding
@Pepcoding 2 жыл бұрын
For better insight, visit nados.io, post your doubts, community will help you out there.
@subhammahanta5042
@subhammahanta5042 3 жыл бұрын
heavy >
@ajayjangid1164
@ajayjangid1164 3 жыл бұрын
respect++ ;
@Pepcoding
@Pepcoding 3 жыл бұрын
Hope you like the video. For better experience and precisely arranged content. visit - nados.pepcoding.com and sign up to NADOS. Don't forget to follow us on Instagram instagram.com/pepcoding/
@kumarakash5219
@kumarakash5219 3 жыл бұрын
Lekin aisa hua kaise yeah toh bataye sir
@mayankaggarwal2937
@mayankaggarwal2937 3 жыл бұрын
abee ye 1 dislike vala kaun h
@Pepcoding
@Pepcoding 3 жыл бұрын
Haha..koi nh beta. Koi kami lgi hui hogi kisi ko. Aap bs pyaar bnaye rkhe aur support krte rhe hume
Каха и лужа  #непосредственнокаха
00:15
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Largest Subarray with Zero Sum | Amazon | MMT
13:54
take U forward
Рет қаралды 219 М.
Subarray Sums Divisible by K - Leetcode 974 - Python
16:41
NeetCodeIO
Рет қаралды 18 М.
Kadane's Algorithm | Maximum Subarray Sum | Finding and Printing
20:09
take U forward
Рет қаралды 483 М.
Sliding Window Technique - Algorithmic Mental Models
36:45
Ryan Schachte
Рет қаралды 361 М.
Number of Subarrays with xor K | Brute - Better - Optimal
24:55
take U forward
Рет қаралды 145 М.
Каха и лужа  #непосредственнокаха
00:15