Triplet Sum in Array | Array | Love Babbar DSA Sheet | Hindi

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Time Stamps :
    Problem discussion : 0:00
    Brute force approach: 01:48
    Optimal approach : 03:00
    Algorithm discussion : 05:34
    Code explanation : 07:06
    Time Complexity Discussion : 08:05
    Time Complexity : O(n*n)
    Space Complexity : O(1)
    Problem Link : practice.geeksforgeeks.org/pr...
    C++ Code Link : github.com/Ayu-99/Love-Babbar...
    Python Code Link: github.com/Ayu-99/Love-Babbar...
    Love Babbar DSA Sheet : drive.google.com/file/d/1FMdN...
    Please like, share and subscribe if you found the video useful. Feel free to ask in comments section if you have any doubts. :)
    #DataStructuresAndAlgorithms
    #LoveBabbarDSASheet
    #interviewpreparation
    Triplet Sum in Array solution
    Triplet Sum in Array Leetcode
    Triplet Sum in Array C++
    Triplet Sum in Array C++ Hindi
    Triplet Sum in Array Hindi
    Checkout the series: 🔥🔥🔥
    👉 Array: • Arrays
    👉 Recursion : • Recursion
    👉 Stack and Queue : • Stack And Queue
    👉 Greedy : • Greedy
    👉 Dynamic Programming : • Dynamic Programming
    👉 Leetcode contests : • Leetcode contests
    👉 Leetcode June Challenge : • Leetcode June Challenge
    👉 Leetcode July Challenge : • Leetcode July Challenge
    LIKE | SHARE | SUBSCRIBE 🔥🔥😊

Komentáře • 72

  • @sumitk8842
    @sumitk8842 Před rokem

    Your explanation>>>>

  • @SonuKumar-uq2rb
    @SonuKumar-uq2rb Před rokem

    the way of teaching is mindblowing, keep it up sister, great job......, god bless u

  • @jatinrastogi_vjm
    @jatinrastogi_vjm Před 2 lety +4

    yes ...you deserved to be subscribed by every coders☺

  • @bhanubhusan4009
    @bhanubhusan4009 Před 6 měsíci

    mam, can i say that for i loop should run till i < n-2 not i

  • @pycharm_boy4344
    @pycharm_boy4344 Před 2 lety +3

    Thanks for giving the concept of three sum using 2 pointers approach really helpful

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety

      Glad it helped. :) Please share with your friends and juniors

  • @explorewithshobhit9157

    Ye video dekhte hi mene Turant Subscribe button Dabaya 👏. Well Explained 👌

  • @suruchibharti7473
    @suruchibharti7473 Před 2 lety +2

    Dii, aap bhaut easily explain kar dete ho complex chizo ko. Thanku di and please make more video on coding questions ask in written and interview questions🙏.

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety

      Thank you so much Suruchi, sure I'll make videos on these problems as well 🙂

  • @pawankumarpandit1822
    @pawankumarpandit1822 Před rokem

    i fall in love with your voice and explanation mam

  • @suraj_patwa
    @suraj_patwa Před rokem +2

    Awesome Video
    Really Helpfull! Thank You Ayushi Didi

  • @bitlegion1027
    @bitlegion1027 Před rokem

    kya awssum approach hai and i love the way you break down the problem and one more thing can you please make a video on time and space complexity i find it tough because i dont have maths background after 10th : }

  • @ecs185_shaileshbharti3
    @ecs185_shaileshbharti3 Před 2 lety +1

    Thank You for the explanation ✌

  • @vishalplayzz2580
    @vishalplayzz2580 Před rokem

    gfg testcases didnt have any duplicates in array right if there are any we have to skip right for no of triplets

  • @keshavsharma5678
    @keshavsharma5678 Před rokem +1

    Liked your approach it really helped me ...
    💯

  • @sanjeetkumar173
    @sanjeetkumar173 Před 2 lety +1

    Are didi concept 🙌🙌🙌🙌🙌🙌🔥🔥🔥🔥

  • @projectsdb4034
    @projectsdb4034 Před 2 lety

    Helpful indeed

  • @sonumondal9376
    @sonumondal9376 Před rokem

    Lovely ❤❤❤❤❤ explanation

  • @sparshpandey2878
    @sparshpandey2878 Před 2 lety

    Thanks for this. 🙂

  • @gouravkumarshaw5467
    @gouravkumarshaw5467 Před 2 lety +1

    very good explanation thanks

  • @SachinRao435
    @SachinRao435 Před 10 měsíci

    But We Don't need to run a for lop till the end n and it need then why give me a reason

  • @sagrika7096
    @sagrika7096 Před 2 lety +1

    Thanku ❤️

  • @tarunchauhan1025
    @tarunchauhan1025 Před 2 lety +1

    well explained!!

  • @ankittiwari2328
    @ankittiwari2328 Před 2 lety +1

    thank u so much didi...this video tells me lot...now i know how to appoach ...any problem....how to do some mathematical calculation and then how to write psudo code or algo..for that one then after doing this....almost 90% work is done...only u write code and run...and also one more thing ...how to use constraints for managing time and space complexity..
    once again didi ...thanks a lot

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety

      Thank you so much Ankit🥺😊. Haan, I'll make a video on how to guess time complexity on basis of constraints

    • @ankittiwari2328
      @ankittiwari2328 Před 2 lety

      @@AyushiSharmaDSA yes as early as possible

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety

      @@ankittiwari2328 yes ✌🏻

  • @karanjitrandhawa1515
    @karanjitrandhawa1515 Před 2 lety

    Best explaination maam 💛

  • @viralchingaari2184
    @viralchingaari2184 Před 2 lety

    really helpful videos

  • @user-kn4zc2gt3r
    @user-kn4zc2gt3r Před 2 měsíci

    Didi, I have subscribed your channel.

  • @thebeatifulnature3142
    @thebeatifulnature3142 Před 2 lety

    wah didi wah........................................

  • @shivanshchaturvedi2601

    outer loop n-2 tk nahi chalna chaie ? n kyu

  • @saunaknandi1814
    @saunaknandi1814 Před 2 lety

    Ayushi can u provide solution to leetcode weekly contest problems ?

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety +1

      Sure Saunak, I'll surely do if I am able to participate in it. :)

  • @mrxxiii1807
    @mrxxiii1807 Před 2 lety

    please do a video for duplicate elements

  • @ayush_kumariitbhu5430
    @ayush_kumariitbhu5430 Před 2 lety

    Di ,with due respect from which college you are?

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 lety +2

      Hi Ayush, I have graduated from Guru Nanak Dev Engineering college

  • @arihant_14
    @arihant_14 Před 2 lety

    Ek request can you please make video on pair sum question in which duplicates are also present. Please make video without using map. Please if possible make this video.

  • @lehar5906
    @lehar5906 Před 2 lety +6

    Shouldn't the complexity be O(n^2logn)? because sorting is also used.

    • @rawat_ji5183
      @rawat_ji5183 Před 2 lety +2

      complexity will be O( n^2) + O(logn)
      => O(n^2)

    • @ayushagrawal7760
      @ayushagrawal7760 Před rokem +1

      @@rawat_ji5183 can you explain this?

    • @rawat_ji5183
      @rawat_ji5183 Před rokem +1

      ​@@ayushagrawal7760 Yes
      let us assume a very large number n (let say (9999)
      now n^2 will be very very large too
      and the value o(log n) will be very very less as compared to n^2 so the time complexity will not have a very huge effect if we do not consider o(log n) that's why we are taking time complexity as o(n^2) not O(n^2) + o(log n)

    • @ayushagrawal7760
      @ayushagrawal7760 Před rokem

      @@rawat_ji5183 thank you soo much now i understand why the complexity is n^2.

  • @TheHariPutraOfficially

    Hareeeee Krishnaaaaaaa
    Mujhe CP quit karne ka Mann kar raha hai Didi 😞

  • @aryanyadav6283
    @aryanyadav6283 Před 11 měsíci

    Hey, when low and high will equals to y then that will be infinite loop , right ?

  • @venkateshn9884
    @venkateshn9884 Před 2 lety +1

    Pls try to make videos in English...as lot of ppl r from south

  • @Ehteshamkhan28
    @Ehteshamkhan28 Před 2 lety

    With the first approach
    It's not passing all the test case