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

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

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the largest subarray with 0 sum problem using hashmaps in java. In this problem,

1. You are given an array(arr) of integers.
2. You have to find the length of the largest subarray with sum 0.

#hashmaps #algorithms #datastructures

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

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.

satyamgupta
Автор

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!

astuteToddler
Автор

8:52 kaise samjh nhi aaiga sir aap itna achha samjhate hai
just clearing all my doubts and strengthening my basics

alfiyazahra
Автор

i don't have words for your explanation sir thank you very much

vatanprakash
Автор

Blkl smjh aara hai Sr,
Dosto ko bhi btaya hai unhe bhi mza ara hai,
Bs aap aise hi bnaate rhie sr videos.

aman
Автор

all good, keep it up. just try to add complexity as well since it is a very important aspect. and alternate efficient solutions

ankitagrawal
Автор

Thank you @Pepcoding that was a clear explanation

KamalKumar-bkrn
Автор

15:17 bhut acche se samjh aaya sir
thank u so much

alfiyazahra
Автор

What a logic simple and clear thank you sir.

lodhiyavishnu
Автор

thankyou so much sir for this best content & your explaination is awsome 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

snehakumaribhadani
Автор

Zabardast Explanation, sir...Thank you :)

_HarshitSharma
Автор

Maza aaya,
Thank u Sumit, good explanation

ibrahimshaikh
Автор

Sir, I have just observed one thing that mostly "subarray" questions are solvable using Hashmap, is it true somewhere, or Intuition changes over questions?

varunmanchanda
Автор

He is the only dsa guy who gets anxiety if his students do not understand .

saptadeepdas
Автор

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<A.length;i++). Just a suggestion for the viewers. Thanks for the wonderful video sir.

anshumanpanda
Автор

thanks, Sumit Bhai...best explanation.

ajeetworking
Автор

what will be the output of the arr[]=-1 1 -1 1
as per code its coming 2 but correct ans is 4

rakeshkumaryadav
Автор

get is inbuilt func???? in java hashmap instead of java what should i use in c++??

jasmeenkaur
join shbcf.ru