Minimum number of Jumps to reach end of an array (DP approach) | Q10 | Love Babbar DSA Sheet

Sdílet
Vložit
  • čas přidán 1. 11. 2020
  • #coding #competitiveprogramming #interviewquestions #dsaseries
    In this video I have explained the 10th problem.
    Here I have explained DP approaches whose time complexity is O(N²).
    One more approach is their whose time complexity is O(N), Link of the video-- • Minimum number of Jump...
    String question Playlist = • Love Babbar DSA 450 Qu...
    Array question Playlist = • Love Babbar DSA 450 Qu...
    Love Babbar DSA sheet : drive.google.com/file/d/1FMdN...
    Hope you like it. If have any doubt then just comment down below.
    LIKE | SHARE | SUBSCRIBE

Komentáře • 68

  • @amartyachoudhary6793
    @amartyachoudhary6793 Před 3 lety +9

    I find O(N) solution much tougher than DP one. Can't understand it

  • @ishanikasingh9321
    @ishanikasingh9321 Před 3 lety +9

    Great solution!

  • @abhishek2116
    @abhishek2116 Před 2 lety

    bro i am having TLE in gfg, should i go O(n)}? need some modifications?

  • @hirakmondal6174
    @hirakmondal6174 Před 3 lety +23

    Is this solution currently being accepted by GFG? In my case it is giving TLE for this O(n^2) approach, though it was accepted few months back.
    Kindly confirm.
    I guess they have now set the time constraints w.r.t O(N) solution.

    • @AyushGupta-kp9xf
      @AyushGupta-kp9xf Před 3 lety +2

      agree.. i tried just now, it isn't accepting it now

    • @rachitjain4985
      @rachitjain4985 Před 3 lety +1

      @@AyushGupta-kp9xf yes, I'm facing the same issue

    • @ankitsharma8078
      @ankitsharma8078 Před 3 lety

      The approach discussed here is o(n^2) dp that will not pas gfg . Gfg requires o(n)

    • @rohankumar393
      @rohankumar393 Před 3 lety

      Watch rachit jain's video, he has done this problem using dynamic programming.

  • @ayushagrawal6473
    @ayushagrawal6473 Před 3 lety +15

    Bro, please try that once more in the GFG I guess constraints are changed and you might get TLE this time.

    • @jolly_dollyyy
      @jolly_dollyyy Před 3 lety

      same issue

    • @ayushagrawal6473
      @ayushagrawal6473 Před 3 lety +1

      @@jolly_dollyyy try the other approach.
      I guess they have uploaded a video for nlogn solution.

  • @captainamerica2992
    @captainamerica2992 Před 3 lety +1

    thanks alot u are awesome

  • @SushilaDevi-zp9le
    @SushilaDevi-zp9le Před 3 lety +2

    Osm video 👍👍

  • @pranaykrmajee1432
    @pranaykrmajee1432 Před 2 lety

    can someone explain why we are adding 1 in line 29?

  • @prasannathapa1024
    @prasannathapa1024 Před 3 lety +6

    🔥🔥🔥

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

    U guys are great 🔥

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

    Good .

  • @rishikayadav5622
    @rishikayadav5622 Před 3 lety

    How to remove driver code on gfg

  • @sudinjana4402
    @sudinjana4402 Před 3 lety +5

    Please make a video series about dynamic programming and greedy algorithm please vaiya I can't solve the question from DP and greedy

    • @CodeLibrary
      @CodeLibrary  Před 3 lety

      After this series we will be uploading videos related to dp also

  • @its_neel_ok
    @its_neel_ok Před 2 lety

    one Q how are u pasting your own code in IDE. most of the Q tells us to complete the function instead of writing the code from scratch :(

  • @bhaveshsoni9140
    @bhaveshsoni9140 Před 3 lety +6

    pls make video on minimize the heights question.

  • @SushilaDevi-zp9le
    @SushilaDevi-zp9le Před 3 lety +2

    Great 👍👍

  • @Arora-Sir
    @Arora-Sir Před 3 lety +2

    I've tried with DP approach on my own. That shows Time limit exceed.
    Then found this approach and then again time limit exceed. Yuo've really explained it well ❤
    abhi going to watch your last video of O(N) hope that works :/

  • @Jk-tr1fb
    @Jk-tr1fb Před 3 lety

    @Codelibrary please complete the course fast ,I'm final year student

  • @priyanshushrivas9534
    @priyanshushrivas9534 Před 3 lety +3

    got TLE with this code

    • @RaxyzGaming
      @RaxyzGaming Před 3 lety

      Bro i solve with complete O(n) till got TLE

  • @yash_verma
    @yash_verma Před rokem

    you can make video in 1080p

  • @shivangisingh2297
    @shivangisingh2297 Před 3 lety

    Can you tell me how do we get to know where to apply dp

    • @anshulgarg6146
      @anshulgarg6146 Před 3 lety +1

      jha par overlapping subproblems dikh rahi ho

  • @divyanshpurohit4556
    @divyanshpurohit4556 Před 3 lety

    nicely explained ...bas number of steps/jumps ko number of ways bol rhe the is liye confusion ho rahi thi thodi

  • @pawankanttiwari8173
    @pawankanttiwari8173 Před 3 lety

    well explained bro
    Keep it up

  • @rohandevaki4349
    @rohandevaki4349 Před 3 lety +1

    whenever i see these type of questions, I always think of recursion method and not dynamic programming , how to think a solution for dynamic programming, it is very tough to think a solution for DP
    please give any suggestion or tutorial on DP with examples

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

    plz explain o(N) make a video and also write code java

    • @CodeLibrary
      @CodeLibrary  Před 3 lety +1

      We have uploaded O(N) solution go and have a look to our channel 😀

  • @Southground
    @Southground Před 3 lety

    why you skipped 9th one?

  • @bhargavsai2449
    @bhargavsai2449 Před 2 lety

    why is it dp[j]+1
    Somebody plz

  • @dibyendubar8920
    @dibyendubar8920 Před 3 lety +3

    TLE!!!!!!!!!

  • @sagargoyal7540
    @sagargoyal7540 Před 3 lety

    TLE Op

  • @dailydestress6189
    @dailydestress6189 Před 2 lety

    Cant get it from your explanation . IDK why : (

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

    n wale video banao

    • @CodeLibrary
      @CodeLibrary  Před 3 lety +1

      We have uploaded O(N) solution go and have a look to our channel 😀

  • @56_shekharshinde84
    @56_shekharshinde84 Před 3 lety +1

    bhai please make videos in hindi

  • @sanjeevkumarray1941
    @sanjeevkumarray1941 Před 3 lety +1

    plz java code

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

      Actually if we write in all languages then video will become long... that's why try to understand the logic and implement by yourself.😀

  • @nandhinirajavell9747
    @nandhinirajavell9747 Před 2 lety

    Bro please upload videos in English alone. As it can be understood by everyone.. I understood your previous videos but not this one.

  • @sanjivmadhavan5705
    @sanjivmadhavan5705 Před 2 lety

    Don't just assume the entire world knows Hindi

  • @ashishkumaryadav5252
    @ashishkumaryadav5252 Před 2 lety

    bhaiya, hindi use kara karo, usme bestter samaajh me aata hai

  • @kartikchausali1598
    @kartikchausali1598 Před 3 lety +27

    Are ye jabardasti ki english bolni jaruri h kya
    Seedha seedha hindi m smjha do agr nhi bola jara english m toh

    • @amyanktiwari
      @amyanktiwari Před 3 lety +6

      Bhai mai bhi yhi soch rha tha ,pr shadad South walo ke liye bolta hoga English me shayad

    • @yogeshyts
      @yogeshyts Před 3 lety +1

      @@amyanktiwari m bhi same yhi soch rha tha

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

      @@amyanktiwari 💝

  • @RaxyzGaming
    @RaxyzGaming Před 3 lety +1

    Bhai yrr tu boht confuse krta hai yrr

  • @mdzikrullah9575
    @mdzikrullah9575 Před 2 lety

    I really think you need to improve your explanation.

  • @sanjaymadhavan1893
    @sanjaymadhavan1893 Před rokem

    Talk in English/Hindi. Half way through, changing a language made this video useless

  • @SaurabhSingh-wp2cm
    @SaurabhSingh-wp2cm Před 3 lety +1

    bakwas