9 Rain Water Trapping

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ธ.ค. 2024

ความคิดเห็น • 520

  • @punee673
    @punee673 4 หลายเดือนก่อน +8

    This video i watched a year ago definitely got me my job now in my final year. You taught so well i was able to recollect every approach from this. So thanks a ton.

  • @subhajitdutta5216
    @subhajitdutta5216 4 ปีที่แล้ว +254

    Great explanation, and u r right jenny mam is pretty😂

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +155

      right? You feel me ? !! 😂😂😂😂😂😂😂😂😂😂😂

    • @subhajitdutta5216
      @subhajitdutta5216 4 ปีที่แล้ว +4

      @@TheAdityaVerma yup😂🙏, waiting for ur videos though

    • @vivektyson
      @vivektyson 4 ปีที่แล้ว +5

      @@TheAdityaVerma awaaz bhi unka kitna pyaara hai

    • @satishchandra2652
      @satishchandra2652 4 ปีที่แล้ว

      ​@@TheAdityaVerma hahhah

    • @LetszGoo
      @LetszGoo 4 ปีที่แล้ว +9

      haha she is theory teacher. whenever i see her video i thought seh never coded in her whole life.

  • @amanagarwal2022
    @amanagarwal2022 3 ปีที่แล้ว +283

    Jenny kafi achchha padati hai +sunder bhi dikhti hai!
    Koi kinta bhi achcha DSA karle aakhir meh rehata engineer he hai 😂😂

    • @snverma5357
      @snverma5357 3 ปีที่แล้ว +9

      men will be men...sargam lolol

    • @Shourya_performs
      @Shourya_performs 3 ปีที่แล้ว

      😂😂

    • @deepakffyt2844
      @deepakffyt2844 ปีที่แล้ว

      Exam me pass hone ke liye jada tar padhte hai

  • @devashishbawa8236
    @devashishbawa8236 3 ปีที่แล้ว +136

    15:50 we understand the double meaning laughter 😂😂😂

  • @joichirogaming
    @joichirogaming 4 ปีที่แล้ว +24

    The best part of his videos is:
    he explains from starting
    tells all expected approaches and their disadvantages
    and finally tells approach that will give the correct answer
    and then gives the solution.
    Hats off!!!!

  • @anshmishra3066
    @anshmishra3066 11 หลายเดือนก่อน +6

    2:12 "dekhna hai to jaaker JENNY k lecture dekho dikhti bhi sundar hai aur acha bhi padhati hai"
    Has a separate fanbase in my college

  • @srajikagupta3627
    @srajikagupta3627 4 ปีที่แล้ว +220

    Volume is very low sir please try to keep it a little more 😅

    • @varungupta420
      @varungupta420 ปีที่แล้ว +2

      bhaii boats ke headphones se hi sunai de rha merko

    • @abhishekbhowmick5912
      @abhishekbhowmick5912 9 หลายเดือนก่อน

      Thanks for this comment, else I would consider this class as mute!

  • @harishgupta8351
    @harishgupta8351 2 ปีที่แล้ว +14

    Man, Teacher's day never made sense to me before but now after watching these videos, my thinking has changed completely. If teachers in India can focus on developing the thought process in students rather than just completing the syllabus and getting their students in merit list, a lot can change in the country.

  • @sankalparora9261
    @sankalparora9261 4 ปีที่แล้ว +59

    Great video. Damn amazing. You can't imagine what great service you are delivering. I get the idea and I even figure out the whole code in between the video. This is the sign of a great teacher. He just need to give a sign to the student, and the rest becomes a story. You gave me the true picture of what is APPROACH. Otherwise, I was just understanding the idea of the problem or just memorizing how to solve it. You are a CODING GOD.

    • @shubhamthind8286
      @shubhamthind8286 4 ปีที่แล้ว +3

      You are right 😁

    • @RahulKumar-rx6sk
      @RahulKumar-rx6sk ปีที่แล้ว

      Bro how can i use pair in java ?? Actually I am in doubt

  • @sadhinoor5114
    @sadhinoor5114 3 ปีที่แล้ว +25

    Bro i really wish i found out about u sooner currently 6th sem passed and watching ur videos for recap......best teacher by far!
    Mad respect bhaiya!:))

  • @dsa9980
    @dsa9980 4 ปีที่แล้ว +27

    Aadi bhai you rock yarr.. !!
    Bhai aapka teaching style todd hai.. ek baar dekhte hi sab samaz aata hai.. bahot dua lagne wali hai aapko sabki..
    You doing a commendable job..!! Hats off yarr..!!
    I hated DS Algo kyunki mujhe bahot tough lagta tha ye sab.. pr ab nahi.. sala kash kisine aisa angle dikhaya hota pehle.. I love solving problems now and successfully able to find patterns in it. Thanks, man..!!
    Keep up the good work..!! Waiting for more..!! God bless.. :-)

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +18

      Thanks brother !! Such long comments always put a smile across my face ❤️✌️✌️
      Also Do share the content amomg your friends and collage to help the channel grow !! Thanks for watching again !!

    • @dsa9980
      @dsa9980 4 ปีที่แล้ว +4

      @@TheAdityaVerma Needless to say.. already shared and received a lot of praise for sharing..!! :D :P

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +6

      Thanks a ton !!

    • @AbhineetDeep
      @AbhineetDeep 4 ปีที่แล้ว +5

      @@TheAdityaVerma bro thoda jor se bola kr pls..

  • @varungoel6981
    @varungoel6981 3 ปีที่แล้ว +79

    Today I got selected in Flipkart all because of your videos Aditya!
    Besides learning technical stuff, I got to learn from you on how to handle and approach complex problems.
    Thanks a lot!
    I really owe you a lot, can't msg on LinkedIn since you haven't accepted my request but I'm gonna ping you as soon as I join to thank you :)

    • @crajeducation6733
      @crajeducation6733 2 ปีที่แล้ว +8

      apna LinkedIn ka profile do to

    • @musclefitnesstv6550
      @musclefitnesstv6550 2 ปีที่แล้ว

      @@crajeducation6733 😂😂

    • @adi5962
      @adi5962 ปีที่แล้ว

      ​@@crajeducation6733nhi laga lagta hai

    • @vaishnavimovva5048
      @vaishnavimovva5048 ปีที่แล้ว +1

      Aditya sir is in flipkart too. Hope you get to meet him

  • @AniketSinha291
    @AniketSinha291 4 ปีที่แล้ว +14

    Very good approach Of breaking down water level at each building level.
    Minor enhancement: the last loop just to calculate sum can be eliminated. You can instead keep adding to sum right after you calculate water level at index i.
    sum += water[i]; // after calculating water[i]

    • @aniketpathak2721
      @aniketpathak2721 2 ปีที่แล้ว +3

      bhai ye toh stack ka sawal tha hi nhi

    • @aloksingh4110
      @aloksingh4110 2 ปีที่แล้ว

      Aditya sir ke aagey mahaanta dikhaaega neech aadmi, jaa jaake ppap dho ganga mein

  • @PrinceKumar-el7ob
    @PrinceKumar-el7ob 3 ปีที่แล้ว +25

    leetcode solution for reference - for noobies like me !!
    int trap(vector& arr) {
    int n =arr.size();
    vector right_max(n);
    vector left_max(n);
    // no matter what we can't store water on edge buildings
    left_max[0]=arr[0];
    for(int i=1;i=0;i--){
    right_max[i]=max(arr[i],right_max[i+1]);
    }
    int sum=0;
    for(int i=1;i

    • @kirtikhohal3313
      @kirtikhohal3313 2 ปีที่แล้ว

      Thanks

    • @shashankbhatgs1150
      @shashankbhatgs1150 2 ปีที่แล้ว +3

      in case someone needs a java solution:
      class Solution {
      public int trap(int[] height) {
      int n = height.length;
      int[] maxL = new int[n];
      int[] maxR = new int[n];

      maxL[0] = height[0];
      for(int i = 1; i < n; i++){
      maxL[i] = Math.max(maxL[i-1], height[i]);
      }
      maxR[n-1] = height[n-1];
      for(int i = n-2; i >= 0; i--){
      maxR[i] = Math.max(maxR[i+1], height[i]);
      }

      int[] water = new int[n];
      for(int i = 0; i

  • @harshkushwaha2212
    @harshkushwaha2212 3 ปีที่แล้ว +26

    Sir, you said you would add the remaining videos later in the playlist. So can you please add them? They are really helping us. Thanks a lot.

  • @himanshugusain9022
    @himanshugusain9022 4 ปีที่แล้ว +11

    sir please complete the series , it is much needed. Hats off to your explanation ! if possible add queue playlist also

  • @amanjyotiparida5818
    @amanjyotiparida5818 2 ปีที่แล้ว +2

    15:52 that 😈 smile...😁😁😁

  • @SushilKumar-es9ib
    @SushilKumar-es9ib 4 ปีที่แล้ว +1

    Nobody can explain like you. Your explanations makes hardest problem to the easiest problem. Thanks for that

  • @anupamdubey5736
    @anupamdubey5736 3 ปีที่แล้ว +4

    Thanks a lot for the awesome explanation. I was able to code only by listening to the explanation without seeing the solution. Please keep this channel organic with such content unlike others who at a later stage adulterate their channel with ads and shortcut videos.

  • @anime4u766
    @anime4u766 3 ปีที่แล้ว +2

    Bhaiya on fire....jenny sundar b lagti h

  • @praveenchouhan6388
    @praveenchouhan6388 4 ปีที่แล้ว +2

    you nailed it!!! I liked the way you have broken the problem down and the concept of maxleft and maxright, awesome, thanks a lot!!!

  • @ShubhamKumar-lb9lf
    @ShubhamKumar-lb9lf 4 ปีที่แล้ว +57

    15:52😅😂

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +10

      🙊🙊😂😂

    • @AbhijeetKumar-tm5pk
      @AbhijeetKumar-tm5pk 4 ปีที่แล้ว +1

      😂

    • @i-am-mkv
      @i-am-mkv 4 ปีที่แล้ว +17

      "Apne ko kya hai, apne ko toh bas paani nikaalna hai" 🤣

  • @jaineshkumar794
    @jaineshkumar794 ปีที่แล้ว

    👏 Never thought DSA could be so much interesting and easy to learn. These aren't easy problems but hats off to you, after seeing your explanation it's a piece of cake ✌

  • @baibhavagrawal3441
    @baibhavagrawal3441 4 ปีที่แล้ว

    Sir i am being your big fan
    saala puri duniya patani lakhon kharch karke lecture video suit kar raha he aur bhai apna ek page aur mobile phone se unn sabki le raha he.. God Bless bhai.. Love you..

  • @mfaraday4044
    @mfaraday4044 4 ปีที่แล้ว +6

    bhai jitni tarif karu utni kam hai kya content share karte ho aap ,
    ye channel god ka gift hai mere liye aur Aditya verma ( vishnu avatar hai mere life ke liye )

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +9

      Arreyy ni bhai, kaha Vishnuji aur kaha me 😅 Michael Faraday kese bnna hai bs wo bta do 😂✌️
      jokes apart, Thanks for such a beautiful comment, Love you brother 😅✌️

  • @ajaybhagchandani3307
    @ajaybhagchandani3307 4 ปีที่แล้ว +1

    This video helped me in solving the leetcode question of Rain water trapping. Thanks alot!

  • @adityagore2147
    @adityagore2147 ปีที่แล้ว +1

    2:10 had me going 😂😂😂

  • @srinivaschaitanya3305
    @srinivaschaitanya3305 ปีที่แล้ว +1

    kaafi achi padathi hai aur sundar bhi dikthi hai..😂😂

  • @tanmayjain1584
    @tanmayjain1584 3 ปีที่แล้ว

    Yaar mera to dhyaan bhatak jaata hai ...beech beech may pause kar k bs dil pe haath rakh k hsate rehta hun......kitniiii ppyaari hai ye....
    lekin han bahot achcha pdhati hai jenny mam

    • @kusumjoshi8140
      @kusumjoshi8140 3 ปีที่แล้ว

      fuck off.. Aditya Verma is best

  • @sauravdas7591
    @sauravdas7591 3 ปีที่แล้ว +2

    Good Explanation Programming Lord! But Bro, please create the remaining ones in the list, really appreciate your hard work for explaining the concepts. I wished my DSA teacher be like you.

  • @ArpitKumar-yo6up
    @ArpitKumar-yo6up 2 ปีที่แล้ว

    I love your explanation sir

  • @babithakumari5884
    @babithakumari5884 ปีที่แล้ว

    can't thankyou enough for these videos, I can't believe I am able to code faster only by understanding the approach.

  • @youcantgetme1126
    @youcantgetme1126 2 ปีที่แล้ว +1

    15:45 so , apne ko smj aa gya ki kese Pani nikal skte h ..😂😂 anyone noticed that he laughed at that moment 😅😅

  • @deepakdhakad8539
    @deepakdhakad8539 3 ปีที่แล้ว +7

    2:10 yaha boss bhi pighal gye 😂

  • @poonamchauhan1884
    @poonamchauhan1884 3 ปีที่แล้ว +6

    Commendable work of finding patterns and categorising problems. When will you be adding the last four problems of the list you shared in the beginning of the playlist?

  • @AbhishekSharma-ip4df
    @AbhishekSharma-ip4df ปีที่แล้ว

    15:51 his laugh after "tho hame samajh a gaya ki hm kaise paani nikal skte h" Ture engineers😂😂 🙌

  • @Manojrohtela
    @Manojrohtela 4 หลายเดือนก่อน

    Great explanation and Jenny sundar bhi dikhti h savage 😂😂😂😂
    Was confuse with this example
    1,0,2,0,1,3,1

  • @iamvishalaggarwal
    @iamvishalaggarwal 6 หลายเดือนก่อน

    best explanation 🥳

  • @Gauravkr0071
    @Gauravkr0071 4 ปีที่แล้ว

    aditya bhai, tum ho to sb h, vrna kch bhi nhi. dil se dhanyawaad

  • @_AmbujJaiswal
    @_AmbujJaiswal ปีที่แล้ว +2

    jenny achha padhati h aur sundar bhi dikhti h🤣🤣🤣🤣

  • @mohamedfaizan3095
    @mohamedfaizan3095 2 ปีที่แล้ว +1

    2:14 bhaiya op😂😂

  • @logicoverflow1240
    @logicoverflow1240 3 ปีที่แล้ว

    Bhaiya mooj kara di 🔥🔥🔥 maza aagaya

  • @deepakffyt2844
    @deepakffyt2844 ปีที่แล้ว

    Bhai appse aacha koi nahi padtha TH-cam pe ♥️

  • @Missing_man
    @Missing_man ปีที่แล้ว +1

    2:10 comment on jenny was awesome 😎😎😂😂😂😂😂😂😂😂

  • @ananya_gupta2328
    @ananya_gupta2328 5 หลายเดือนก่อน

    "Vo accha pdhati hai, sundar bhi dikhti hai" was heart touching🤣🤣

  • @CodeKickstart123
    @CodeKickstart123 18 วันที่ผ่านมา

    What an explanation 😊

  • @priyanshsaxena2550
    @priyanshsaxena2550 ปีที่แล้ว

    amazing!....jenny ahhhh kyaa baat

  • @lakshkumrawat140
    @lakshkumrawat140 2 ปีที่แล้ว +2

    15:48 kese pani nikal sakte he , and that laughter explains all 😂😂

    • @MasoomSahu-q4z
      @MasoomSahu-q4z ปีที่แล้ว

      And jenny sundar h 🤣🤣🤣

  • @jiteshkumar3112
    @jiteshkumar3112 4 ปีที่แล้ว +17

    brother please complete the series by uploading 4 more questions that you gave in your 1 video of stack

  • @049_neeraj4
    @049_neeraj4 ปีที่แล้ว +2

    Explanation was really amazing, but where did we use stack.

  • @piyushkumar-bl2ck
    @piyushkumar-bl2ck 3 ปีที่แล้ว +4

    Thanks Aditya .
    Constant space - O(1). and single loop solution - O(n)
    void max_water(int A[], int n)
    {
    int l = 0, h = n - 1;
    int left_max = 0;
    int right_max = 0;
    int ans[n] = {0};
    while (l = right_max)
    {
    right_max = A[h];
    }
    else
    ans[h] = right_max - A[h];
    h--;
    }
    }
    for (int i = 0; i < n; i++)
    {
    cout

    • @kirtikhohal3313
      @kirtikhohal3313 2 ปีที่แล้ว +1

      Is it the dp solution??

    • @aryankhanuja4828
      @aryankhanuja4828 2 ปีที่แล้ว

      @@kirtikhohal3313 Dp can not be done without memoisation. This is greedy ig..

  • @lifeexplorer2965
    @lifeexplorer2965 4 ปีที่แล้ว +92

    2:13😂😂

  • @manaligupta5332
    @manaligupta5332 3 ปีที่แล้ว +5

    The current solution is O(N), O(N) for time and space complexity respectively. A more optimized solution exists using constant extra space O(N), O(1).

    • @yoyocontact5181
      @yoyocontact5181 3 ปีที่แล้ว

      can you please help me ? I wrote the whole code but it is giving me segmentation fault , i cant find where is the mistake
      #include
      #include
      #include
      using namespace std;
      #include
      int trap(vector& height) {
      vectormaxl;
      vectormaxr;
      maxl[0]=height[0];
      for ( int i =1;i=0;i--)
      {
      maxr[i]=max(maxr[i+1],height[i]);
      }
      vectorwater;
      for ( int i =0;i

  • @sudipasarkar7981
    @sudipasarkar7981 4 ปีที่แล้ว +2

    areeey you're the best ..i can binge watch your videos

  • @uthsyabmandal2258
    @uthsyabmandal2258 3 ปีที่แล้ว +1

    GOD BLESS YOU BHAI

  • @anmolsingh3482
    @anmolsingh3482 2 ปีที่แล้ว

    Great explanation Sir!

  • @shyamkachhadiya4964
    @shyamkachhadiya4964 6 หลายเดือนก่อน

    wow great problem, solved excellents, there's little maths involved but yea great explanation.

  • @abhineetsingh6720
    @abhineetsingh6720 2 ปีที่แล้ว +3

    "jenny kafi acha padhati hai aur sundar bhi dikhti hai"

  • @ayushbisht2689
    @ayushbisht2689 4 ปีที่แล้ว

    Loved your way of explaining .

  • @ayushagarwal2032
    @ayushagarwal2032 4 ปีที่แล้ว +30

    when are you releasing backtracking playlist?

    • @KartikeyTT
      @KartikeyTT 9 หลายเดือนก่อน +1

      It took him 3 years

  • @sumtverma7810
    @sumtverma7810 4 ปีที่แล้ว +12

    15:46 ,me as a kid when friend told me about homework folder.

  • @teen350
    @teen350 4 ปีที่แล้ว

    Suberb explanation😊

  • @tanmaymalhotra4450
    @tanmaymalhotra4450 3 ปีที่แล้ว

    Finally Understood, Thank you Bhaiyya !!

  • @vishalkumarshaw9208
    @vishalkumarshaw9208 3 ปีที่แล้ว

    you are OP aditya Bhai...jenny wala dialouge

  • @nishantingle1438
    @nishantingle1438 2 ปีที่แล้ว +3

    There is O(1) space complexity solution to it.
    This is indeed related to NGL just nearest is changed to farthest.
    In fact there is no need of stack in NGL, you can just use the same technique to compare with ngl(previous).

    • @anonymous090
      @anonymous090 2 ปีที่แล้ว

      how we can solve it in O(1) ??

    • @kirtikhohal3313
      @kirtikhohal3313 2 ปีที่แล้ว +3

      I don't think we can say this as farthest greater to left:
      suppose this is the array: 6 8 0 0 5 9 6
      for element=5
      max in the left array is 8
      max in the right array is 9
      min of both is 8
      water accumulated on element =5 is 8-5=3. which is correct.
      But, farthest greater to left is 6
      farthest greater to right is 9
      min is 6
      water accumulated is 6-5 =1, which is wrong

  • @aishwaryadwani9365
    @aishwaryadwani9365 4 ปีที่แล้ว +1

    Now are the days when i search about any topic then i type this -> rain water trapping aditya verma... #God

  • @roshangupta8161
    @roshangupta8161 10 หลายเดือนก่อน

    15:50 Bro didn't even hesitate!! 😂😂

  • @itsjustmeandyou
    @itsjustmeandyou 11 หลายเดือนก่อน +2

    15:46 We all know why he laughed

  • @abhishekaggarwal7110
    @abhishekaggarwal7110 ปีที่แล้ว +1

    one line for Jenny 😂
    kaafi acha pdhati hai and sundar bhi dikhti hai 😂

  • @akashbhoi1951
    @akashbhoi1951 3 ปีที่แล้ว +1

    Sundar bhi dikhti hai woh😂🥰🥰

  • @Rajjain_
    @Rajjain_ 3 ปีที่แล้ว

    sunder bhi dikhti hai who😂, But you are the best!

  • @vasupatel635
    @vasupatel635 4 ปีที่แล้ว

    You are doing great job. aditya. Thanks man.

  • @chandankrjha
    @chandankrjha 3 ปีที่แล้ว

    itna acche se explain kiya hai. dhanyawaad.

    • @yoyocontact5181
      @yoyocontact5181 3 ปีที่แล้ว

      can you please help me ? I wrote the whole code but it is giving me segmentation fault , i cant find where is the mistake
      #include
      #include
      #include
      using namespace std;
      #include
      int trap(vector& height) {
      vectormaxl;
      vectormaxr;
      maxl[0]=height[0];
      for ( int i =1;i=0;i--)
      {
      maxr[i]=max(maxr[i+1],height[i]);
      }
      vectorwater;
      for ( int i =0;i

  • @harshtiwari1397
    @harshtiwari1397 4 ปีที่แล้ว +1

    Thanks sir , please keep uploading as these are very useful videos.

  • @dheerajpoonia2175
    @dheerajpoonia2175 4 ปีที่แล้ว +1

    awesome sir, koi word nhi hai apki tarrif krna ka bss jaab selection honne ke baad sweet lekr faculty k pass too pta nhi jaoga ya nhi but appke pass jurur aaoga :-)

  • @subarnasamanta4945
    @subarnasamanta4945 3 ปีที่แล้ว

    Attitude tabar tor hai bhai sahi hai dikhra hai kis level ka preparation hai aur really approach kafi different aur accurate hai

  • @simrankureel94
    @simrankureel94 3 ปีที่แล้ว

    You will very soon have 1M subscribers.

  • @sbrmnd3885
    @sbrmnd3885 4 ปีที่แล้ว +4

    Waiting eagerly for your backtracking playlist. Please release it soon.

  • @strangesoul31
    @strangesoul31 3 ปีที่แล้ว +2

    Still Waiting for Tree,Graph, Backtracking...
    Bhai apko jab bhi time mile to inki video series bana ke upload kr dena🙏🙏🙏

  • @be_like__prateek
    @be_like__prateek 4 ปีที่แล้ว +30

    was expecting the approach using stack. It's nowhere in the utube. DP approach is explained by everyone as it is easy.

    • @kirtikhohal3313
      @kirtikhohal3313 2 ปีที่แล้ว +3

      no doubt , he gave an amazing explanation, but we didn't used stack in this solution, then what's the point of adding this question in the stack playlist?

  • @harshvardhanyadav8949
    @harshvardhanyadav8949 3 ปีที่แล้ว

    Amazing explanation sir ,you make this problem a lot easy

  • @sagardas4569
    @sagardas4569 4 ปีที่แล้ว +2

    Btw very good concept i understand through this ❤️❤️

  • @dashrathsinghkaviya
    @dashrathsinghkaviya 3 ปีที่แล้ว

    15:52 That Laughter 😂

  • @sampathrajaraghupathikagup8723
    @sampathrajaraghupathikagup8723 3 ปีที่แล้ว +1

    This problem clearly identifies stack . as we go maxleft and maxright element comparing to the current element. So seen the full video and disappointed by not using stack. So I implemented the Stack-based approach its is similar to NGL and NGR but little modifications need to be done.and also similar to above video approach but below code uses stack and above code uses max(arr[i],max[i-1]);
    Note:-All my knowledge is acquired from Aditya verma's channel.
    JAVA CODE
    class Solution{
    // arr: input array
    // n: size of array
    // Function to find the trapped water between the blocks.
    static int trappingWater(int arr[], int n) {
    int sum=0;
    int maxright[]=maxRight(arr,n);
    int maxleft[]=maxLeft(arr,n);
    for(int i=0;i=0;i--)
    {
    if(st.peek()

    • @Raj10185
      @Raj10185 ปีที่แล้ว

      we don't really need to implement stack in this problem if we use stack our space complexity increases without any benefit so we can just do it using traversing and creating two array instead of stack

    • @TuringTested01
      @TuringTested01 ปีที่แล้ว

      faltu ka oversmart bann raha hai jaise koi reimann hypothesis ka solution nikal diya ho, jab jarurat nahi hai stack ki aur O(1) space mein bhi hoskta hai toh faltu mein stack kyu ghusedna hai, push pop push pop karne mein maza arha h kya terko

  • @ajitdhayal1612
    @ajitdhayal1612 4 ปีที่แล้ว +6

    Jenny kafi achchha padati hai +sunder bhi dikhti hai!
    Sir aapka crush hai sayad😂

    • @TheAdityaVerma
      @TheAdityaVerma  4 ปีที่แล้ว +12

      Tum log badnaam mt kro be, 😂😂 tum logo interest aaye isliye bola tha yaar, yaha to backfire ho gya 😕😅

  • @jaydeepmahajan6598
    @jaydeepmahajan6598 4 ปีที่แล้ว +8

    Explanation is really good but i didn't see stack in this problem

  • @anshulsoni653
    @anshulsoni653 ปีที่แล้ว +2

    2:10 bro said it

  • @tanzeelurrahman1545
    @tanzeelurrahman1545 3 ปีที่แล้ว

    Add link to problem in your videos.
    TY for the amazing tutorials.

  • @calderanoadi5982
    @calderanoadi5982 3 ปีที่แล้ว

    God sir🔥🔥

  • @ShreyaSingh-vr9qi
    @ShreyaSingh-vr9qi 4 ปีที่แล้ว

    Nice explaination !!

  • @rakeshkumaryadav1117
    @rakeshkumaryadav1117 2 ปีที่แล้ว

    there is no word for what this channel is providing

  • @Anand-zg6jv
    @Anand-zg6jv 4 ปีที่แล้ว

    Bhai or SB topic pe videos dalo na .... Bhut Shi samjh Mai aata tumhari video se

  • @rajkhandelwal2759
    @rajkhandelwal2759 3 ปีที่แล้ว

    So apne ko smjh m aagya ki hm kaise paani nikaal skte h 😂😂at 15:48 😂😂

  • @AmanKumar-kz1rn
    @AmanKumar-kz1rn 4 ปีที่แล้ว +2

    samshj me agya kaise pani nikalna hai
    thanks bhaiya for such a wonderfull explanation

  • @samareshms4591
    @samareshms4591 4 ปีที่แล้ว +2

    Apke video ko bc kaun bewakoof insaan dislike kar raha hai
    Kitne acche padha rahe ho aap
    Aapko jitna like diye toh bhi kam padega
    THANK YOU BHAYYA!!
    Keep helping us

  • @okeyD90232
    @okeyD90232 3 ปีที่แล้ว

    15:48 that silent laugh :D

  • @nitingupta1417
    @nitingupta1417 4 ปีที่แล้ว +6

    I have no words... : ) : D

  • @mrinalkhandelwal9631
    @mrinalkhandelwal9631 4 ปีที่แล้ว +11

    Sir, please upload videos on graph problems: DFS, shortest paths, SCC

  • @adityamaurya9277
    @adityamaurya9277 4 ปีที่แล้ว +9

    those who learned " pani kaise nikalte hai".....like the video

  • @loveysingh9913
    @loveysingh9913 4 ปีที่แล้ว

    kya baat hai sir jenny ma'am toh kuch zyada hi sundar nikli