Minimum jumps to reach end of array (Dynamic Programming)

We find minimum jumps to reach end of array. This is a dynamic programming problem.

Пікірлер: 176

  • @vibhashreems526
    @vibhashreems5263 жыл бұрын

    Watched everybody's explanation whole day I searched but I finally understood yours

  • @AlokGuptakumar
    @AlokGuptakumar6 жыл бұрын

    u really patiently explain all solutions...thanks

  • @siddharthkhandelwal933
    @siddharthkhandelwal9335 жыл бұрын

    U actually teach very well.and that clearly explains that u have the feel of DP

  • @nickharalampopoulos
    @nickharalampopoulos4 жыл бұрын

    This is the most thorough explanation I have seen. Thank you.

  • @mdalishanali3909
    @mdalishanali39092 жыл бұрын

    I was struggling a lot with this problem. Thank you for explaining so thoroughly.It is helpful after 100 years also..

  • @historybrow9850
    @historybrow98504 жыл бұрын

    i am always so happy, whenever i search for a problem and u have a solution, u give the best explanations

  • @rajashribanerjee6934
    @rajashribanerjee69342 жыл бұрын

    I was struggling a lot with this problem. Thank you for explaining so thoroughly.

  • @vaibhavimandloi6953
    @vaibhavimandloi69532 жыл бұрын

    I was stucked at this problem for a whole day but now I got it completely .Thankyou!!

  • @rajitsrajan2644
    @rajitsrajan26443 жыл бұрын

    Your channel is great. Please continue uploading videos. Your presentation and way of teaching is amazing. Keep up the good work.

  • @devanshsharma5704
    @devanshsharma57044 жыл бұрын

    The best explanation for the problem , huge respect sir

  • @cedong6412
    @cedong64126 жыл бұрын

    Really love your video for this topic! I think you are the only one who teaches step by step and I totally understand DP solution for this problem, thanks for your efforts and wish all the best:)

  • @mahakgupta5165
    @mahakgupta51654 жыл бұрын

    This same question was asked in Goldman Sachs internship written paper. At that i was unable to solve ,but now i can. Thank you.

  • @natesh1
    @natesh16 жыл бұрын

    In ur videos pls consider to mention the time and space complexity also. Helps greatly to judge the method.

  • @gaurav19may

    @gaurav19may

    6 жыл бұрын

    Agreed. Otherwise, they are excellent. Thank you.

  • @DSA_Coding

    @DSA_Coding

    3 жыл бұрын

    o(n^2)

  • @sandeshdalvi3781

    @sandeshdalvi3781

    3 жыл бұрын

    Yes , exactly

  • @captainamerica2992
    @captainamerica29923 жыл бұрын

    i watched a 1000 videos on this question and this video just explained it so easily , thanks

  • @adarshgupta4382
    @adarshgupta43825 жыл бұрын

    You are indeed the best teacher for algorithm .

  • @shivamshrivastava5019
    @shivamshrivastava50194 жыл бұрын

    sir you expalain too good ...i was searching for the channel like yours for two week, finally i got your channel ....SUBSCRIBED SIR

  • @satanlucifer4437
    @satanlucifer44373 жыл бұрын

    Something about your explanation really clicked we me. Since we haven't learned the technique of using infinity in my class, I instead used None and added a couple if statements :)

  • @alpeshnakarani
    @alpeshnakarani5 жыл бұрын

    Super Detailed explanation. Really helpful.

  • @kdroadie
    @kdroadie5 жыл бұрын

    my dynamic programming grip is now awesome,,thanks to u sir

  • @ragingpahadi
    @ragingpahadi4 жыл бұрын

    Your explanation are detailed ad very very easy to understand keep up the good work buddy !

  • @bijayamanandhar3890
    @bijayamanandhar3890 Жыл бұрын

    I want to work as a data scientist or machine learning engineer, and preparing for job interview. Your videos help me a lot, however 'Graph' is new to me.

  • @vikashkumarchaurasia1299
    @vikashkumarchaurasia12995 жыл бұрын

    best explaination i have ever seen for this problem , thanks a lot !!!

  • @shubhadityamaljonia6613
    @shubhadityamaljonia66133 жыл бұрын

    Really a good explanatory video but it would be more better if you put a link of the code explained in the video, as it would be difficult for us to find code of such beautifully explained algorithm. Thanks Again...

  • @sarfarazalam6077
    @sarfarazalam60774 жыл бұрын

    You made my day!! Thank you great explanation. Video answered all my doubts. It would be more useful , if you could give intuition to problem.

  • @adityapandey9758
    @adityapandey97583 жыл бұрын

    sir aapka code itna simple aur chota tha...aur mene code likhne me 2 din laga diya phir bhi solution nahi nikala....phir aapka code dekha...aur bht hasi aayi itne simple code ke liye me najane kya kya kr raha tha😂😂

  • @ranjanrohit64
    @ranjanrohit645 жыл бұрын

    THANKS FOR SUCH A BEAUTIFUL VIDEO SIR. I GOT IT FULLY...A BIG THANKS

  • @narayananrenganathan765
    @narayananrenganathan7655 жыл бұрын

    Please add videos for different sorting algorithms. Thanks in Advance. Great work. Keep going !!

  • @EternalDharma01
    @EternalDharma016 жыл бұрын

    One minute was enough to make a comment about the video. Loved it.

  • @pranybany
    @pranybany4 жыл бұрын

    Thanks Vivekanand Khyade you rock as always.

  • @teetanrobotics5363
    @teetanrobotics53635 жыл бұрын

    Can you please order the dynamic programming playlist ?

  • @niveditakatakam
    @niveditakatakam6 жыл бұрын

    To reduce the number of iterations, I think we can directly start index j from jump_path_arr[i-1] and check if i is reachable and increment j from there.

  • @laraibanwar1618
    @laraibanwar16184 жыл бұрын

    Sir please put up more videos on dp It was very helpful. Ur way of explanation is very good I was able to solve codeforces problems related to dp Plz sir

  • @keerthanamahalingam474
    @keerthanamahalingam4743 жыл бұрын

    Hats off to your explanation sir great video sir

  • @JustSkillGG
    @JustSkillGG5 жыл бұрын

    I would add a "break;" command after the if {..} Excelent work.. Thank you sir! This channel will definetely blow up someday

  • @sourabhahuja
    @sourabhahuja6 жыл бұрын

    Awesome Vivek!!! Great Videos. Thank you very much :-)

  • @tan5553
    @tan55534 жыл бұрын

    Could you please xplain the problems in cracking coding interview book... The way you xplain is easily understandable.

  • @bharadwajachepuri968
    @bharadwajachepuri9686 жыл бұрын

    Hi Sir can you please explain the grid formation of Egg Dropping Problem and longest ariyhmetic sequence in DP

  • @aaokhelen
    @aaokhelen3 жыл бұрын

    greatest tutorial i've ever seen. Keep it up

  • @bhanuarora4504
    @bhanuarora45043 жыл бұрын

    Really nice explaination for a beginner like me,thanks sir

  • @anmolkumarshah
    @anmolkumarshah3 жыл бұрын

    very good explanation .. really liked your way of teaching i hit the bell icon now

  • @hrithikjaiswal4040
    @hrithikjaiswal40403 жыл бұрын

    Great One ! Excellent dry run..

  • @raj-nq8ke
    @raj-nq8ke2 жыл бұрын

    As usual always the best explanation.

  • @manasranjan4
    @manasranjan43 жыл бұрын

    Good Explanation. Kudos Really you appreciate

  • @anirudhdevpura2798
    @anirudhdevpura27983 жыл бұрын

    very good and thorough explanantion. Keep it up sir. But just try to explain complete code also along with explanation

  • @shyamnwade
    @shyamnwade4 жыл бұрын

    Excellent way of explaining algorithm

  • @sajeelkhan4500
    @sajeelkhan45002 жыл бұрын

    brilliantly explained sir

  • @aditikhandelwal135
    @aditikhandelwal1353 жыл бұрын

    Amazing!! after so many videos this is best

  • @RANJANJHA95
    @RANJANJHA956 жыл бұрын

    Please help if you can design some optimised algorithm for below problem statement. You have synonyms for words stored in dictionary/map like HashMap synonyms = new HashMap() synonyms.put(“tree”, “tree1") synonyms.put(“far tree”, “tree2") You have to replace the word present in input string with the value corresponding to the key present in the map. Input: I saw a far tree near the old tree Output: I saw a tree2 near the old tree1

  • @AllTypeShorts..
    @AllTypeShorts..3 жыл бұрын

    Sir, I was struggling for understanding this problem. I even tried 3-4 video lectures of different people but still I can't get it. But the way you explained this problem hit directly in my brain and finally I find it very easy. Many Many thanks for your explanation and efforts. God bless you always.

  • @pratikpatrimath4887

    @pratikpatrimath4887

    2 жыл бұрын

    same here bro😄

  • @veganengineer2019
    @veganengineer20193 жыл бұрын

    excellent explanation. very thorough

  • @mybabyharshu
    @mybabyharshu4 жыл бұрын

    great explained .. when you assigning jump path array ?

  • @ayaramzy6815
    @ayaramzy68153 жыл бұрын

    I love yr videos u are the best ... please explain palindrome partitioning

  • @nitinnanda1865
    @nitinnanda18655 жыл бұрын

    does it work for arr[0, 1, 1, 1, 1]

  • @bhaskyOld
    @bhaskyOld5 жыл бұрын

    Any solution with O(n)?

  • @piyushrathi9771
    @piyushrathi97713 жыл бұрын

    Can you explain how the algorithm will take care of the array [0,1,1,1,1]???

  • @ir0nt0ad
    @ir0nt0ad6 жыл бұрын

    thanks a lot! could you please do Kruskal's MST at some point?

  • @surya0072
    @surya00726 жыл бұрын

    superb !! any real time situations where we use this logic ?

  • @VIJENDRASINGH-zg2lp
    @VIJENDRASINGH-zg2lp3 жыл бұрын

    Best explanation. Thank you!

  • @yashnistane6728
    @yashnistane67283 жыл бұрын

    Very beautifully explained!!!

  • @ashwanisharma8903
    @ashwanisharma89032 жыл бұрын

    Thanks sir. You just made complex algo like kids game. Thanks a ton.

  • @ankitsinha9019
    @ankitsinha90194 жыл бұрын

    Awesome explanation...sir

  • @therohanjaiswal
    @therohanjaiswal3 жыл бұрын

    the best explanation for this problem

  • @ashishupadhyay6881
    @ashishupadhyay68813 жыл бұрын

    A few changes to make it O(n) instead of O(n^2) :) jump(vector &a) { int n=a.size(); if(n

  • @subhashmallick

    @subhashmallick

    3 жыл бұрын

    Also you could have done early return whenever dp[j] is filled where j has reached n-1.

  • @tarungopal3065
    @tarungopal30654 жыл бұрын

    Can you please make a video on " Count of subarrays whose sum is a perfect square".

  • @namanvijay3514
    @namanvijay35143 жыл бұрын

    Best explanation 👍

  • @dhirendrakumar4619
    @dhirendrakumar46195 жыл бұрын

    Very Good explanation Sir thanks

  • @harshpanwar1550
    @harshpanwar15503 жыл бұрын

    Thank u so much sir!!! This really helped a lot...

  • @RahulKumar-lb9nk
    @RahulKumar-lb9nk6 жыл бұрын

    Your videos are very interesting .. It would be great if could segregate your content based on context and post as modules

  • @hirakmondal6174
    @hirakmondal61743 жыл бұрын

    Great video, but one point to note is that it will fail for some corner cases like--> arr[]={0,1,1,1,1}. This doesn't has any solution

  • @anujdeep3796
    @anujdeep37965 жыл бұрын

    thank you sir for the wonderful video.

  • @lueizack6639
    @lueizack66393 жыл бұрын

    superb explanation

  • @abcd1235911
    @abcd12359114 жыл бұрын

    This is an O(n^2) solution. Do you have O(n) solution?

  • @ANANDJULU
    @ANANDJULU5 жыл бұрын

    awesome explanation!

  • @user-lb1fl7sh8m
    @user-lb1fl7sh8m6 жыл бұрын

    You are a boss keep the good work

  • @yogeshkolpe2601
    @yogeshkolpe26015 жыл бұрын

    awesome explanation !!!

  • @svdfxd
    @svdfxd5 жыл бұрын

    Another excellent video.

  • @sukritkapil9816
    @sukritkapil98164 жыл бұрын

    thanks for detailed explanation!

  • @madhusudanankaskar3989
    @madhusudanankaskar39895 жыл бұрын

    Sir kindly make a video on Buying and selling of shares using k transactions. I am not able to understand the concept.

  • @utsavkaranjit2911
    @utsavkaranjit29113 жыл бұрын

    Amazing Explanation to the solution. But looks like this solution is too slow. How can we improve the time complexity?

  • @priyanshukhullar5836
    @priyanshukhullar58364 жыл бұрын

    Jordaar Uncle :)

  • @sakthisri5625
    @sakthisri56256 жыл бұрын

    Can u pls upload a video on minimum initial points to reach destination

  • @anubhavnema613
    @anubhavnema6133 жыл бұрын

    Too good explanation

  • @ashishjangir88
    @ashishjangir883 жыл бұрын

    Another Solution in just O(n) and Easy to Understand: int minJumps(int arr[], int n){ // Your code here if(arr[0] == 0) return -1; else if(n == 1) return 0; int dest = 0, pos = 0, jumps = 0; for(int i=0; i

  • @Rafi-nc3nw

    @Rafi-nc3nw

    2 жыл бұрын

    Thank you very much!!! Such a mind blowing and easy concept.

  • @PrafulPrasad
    @PrafulPrasad4 жыл бұрын

    Super awesome explanation. The answer to the problem is explained on geeksforgeeks.org but I never understood it even after trying to debug the code multiple time. This is a lengthy video but it was well worth my time understood it in an instant. The only problem is its not the most optimal solution even in DP :(

  • @sushmitamandal942
    @sushmitamandal9423 жыл бұрын

    amazing explanation

  • @priyankajhamb7061
    @priyankajhamb70612 жыл бұрын

    Nice explanation

  • @AshishKumar-to7gy
    @AshishKumar-to7gy4 жыл бұрын

    nice explanation..

  • @rahulchaubey8988
    @rahulchaubey89884 жыл бұрын

    Nicely explained...

  • @riitviksharma5932
    @riitviksharma59322 жыл бұрын

    Best explanation

  • @sonurathod9551
    @sonurathod95512 жыл бұрын

    This code fail in [2,1,0,3] need help?

  • @vikasmishra1190
    @vikasmishra11904 жыл бұрын

    Jump= -1; Sum=0; While (sum=n){ jump++; } cout

  • @DSA_Coding
    @DSA_Coding3 жыл бұрын

    I really enjoyed your way of teaching ,

  • @vivekanandkhyade

    @vivekanandkhyade

    3 жыл бұрын

    Thank you! 😃

  • @AbhishekKumar-wc2he
    @AbhishekKumar-wc2he4 жыл бұрын

    sir please make some videos on question asked on heaps

  • @yidonghuang3280
    @yidonghuang32804 жыл бұрын

    He is a amazing teacher(from a leaner in China)

  • @Aryansingh-fk7hy

    @Aryansingh-fk7hy

    3 жыл бұрын

    CCP has blocked KZread in china!,you use VPN or live in india istead?

  • @yidonghuang3280

    @yidonghuang3280

    3 жыл бұрын

    @@Aryansingh-fk7hy I'm living US

  • @Aryansingh-fk7hy

    @Aryansingh-fk7hy

    3 жыл бұрын

    @@yidonghuang3280 fortunate you are!!.

  • @tanushreeyadav745
    @tanushreeyadav7454 жыл бұрын

    plz can u upload word break dp question solution

  • @coder_ishwar_kumar
    @coder_ishwar_kumar2 жыл бұрын

    Can u pls solve this in O(N) TC ans O(1)SC .. thx fr the great video ... even though i know the solution i always come to ur channel to watch the solution bcoz ur explanations are great..

  • @BhaiyaDesi
    @BhaiyaDesi4 жыл бұрын

    The algorithm could fail in many uncommon scenarios like {1, 0, 3, 5}. Algorithm explained is pretty straightforward , but it lacks accommodating few exceptional cases.

  • @Mei-ir3ml
    @Mei-ir3ml6 жыл бұрын

    Superb!!!

  • @ishan_kumar
    @ishan_kumar5 жыл бұрын

    One more check is required in if condition. Awesome explanation though. Kudos! if( i

  • @laveenajethani9734
    @laveenajethani97343 жыл бұрын

    nice explaination