Cutting a rod into pieces to maximize Profit (Dynamic Programming)

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 110

  • @CinemaResponses
    @CinemaResponses 10 місяців тому +1

    one of the best explanations in dynamic programming I had seen so far.Thanks a lot sir😊

  • @aliosatiashtiani3345
    @aliosatiashtiani3345 2 роки тому +6

    I compared a few videos plus my proffessor explaination, I have to admit this one was by far the best. I wish our instructors could explain these clearly. Thank you

  • @parthokr
    @parthokr 4 роки тому +2

    Best explanation ever. Most of the youtubers only fill a dp table without explaining why s/he excluding a cell or row but he did it very easily. Thanks a lot.

  • @algorithmimplementer415
    @algorithmimplementer415 5 років тому +2

    I must admit that your videos are of high quality and you are just great for making these available at no cost. Thank you very much! Keep it up. :)

  • @rajatbais6388
    @rajatbais6388 6 років тому +1

    I just understood the 0/1 knapsack after watching your way of solving the problem.
    thankyou for teaching in a very easy manner, please continue to make such useful videos.

  • @736939
    @736939 7 років тому +17

    Finally, someone explained DP in understandable human language. Thank you!

  • @prettypixel06
    @prettypixel06 8 місяців тому

    I watched more then 5 videos but could not understand anything. I was so frustrated but then I came across this video which cleared my all doubts and helped me in understanding the concept. Thankyou so much Sir. 😇

  • @nasserabdullah9458
    @nasserabdullah9458 5 років тому

    the best explanation so far on UA-cam for this problem

  • @bharatprakashparakh9601
    @bharatprakashparakh9601 5 років тому +2

    Best explanation on this entire planet !

  • @ramgod123
    @ramgod123 7 років тому +28

    I noticed that your original profit in the problem statement does not match with what is used in matrix. in the example you specified the profit were 2, 5, 7, 8 respectively on your left side, but when you compute the matrix your profit is values are 2,5, 9, 6.

    • @jain007neeraj
      @jain007neeraj 7 років тому

      but that is not making any difference right.

  • @jinhuang7258
    @jinhuang7258 Рік тому

    This is the best video on this topic. Thank you so much!

  • @pratikjain4704
    @pratikjain4704 6 років тому +5

    Thanks a lot, man. Saw almost 5 video solutions till now and didn't get a thing. You rock \m/

  • @training-ebeti2449
    @training-ebeti2449 5 років тому

    the most informative video on DP I've seen!

  • @yuvaranikannan9297
    @yuvaranikannan9297 5 років тому +4

    Crystal clear explanation:)Thank you so much sir!!!

  • @parth81091
    @parth81091 7 років тому +2

    Vivekanand please keep making such detailed explanatory videos

  • @kabboghosh1853
    @kabboghosh1853 4 роки тому

    sir plz upload more ,dont stop making such great videos

  • @formalmethods2442
    @formalmethods2442 11 місяців тому

    Each step of the bottom-up DP algorithm should also be explained, along with the dry run of the algorithm. Overall it's a good explanation.

  • @tsx-w4z
    @tsx-w4z 2 роки тому

    Oh my goodness you are a life saver! Thanks a lot.

  • @aashishgoyal1436
    @aashishgoyal1436 5 років тому

    Thank u so much..u explained this problem in such an easy way

  • @amanmehrotra9540
    @amanmehrotra9540 7 років тому +4

    simply awesome sir !! U have made dp so easy to understand!!! Wish u more subscriptions and likes to your videos !!

  • @kapishrayat5670
    @kapishrayat5670 4 роки тому

    Amazing video.
    Was of a great Help.Thanks a ton for upload.

  • @mayankjha6019
    @mayankjha6019 8 місяців тому

    Great Explanation Sir!

  • @ahishnar1568
    @ahishnar1568 5 років тому

    Nice explanation.
    Really appreciate your efforts.

  • @stephanieo5437
    @stephanieo5437 6 років тому +3

    literally the most informative video I've seen! thxs

    • @zummotv1013
      @zummotv1013 5 років тому +1

      you have to watch more videos.

  • @svdfxd
    @svdfxd Рік тому

    you explained it very well...please keep making more such videos. I have a question - can we build the solution using 1-D array?

  • @chandanroy8101
    @chandanroy8101 4 місяці тому

    excellent way of explanation. Thanks

  • @johns6176
    @johns6176 5 років тому

    Excellent and precise explanation.

  • @nathann4291
    @nathann4291 5 років тому

    I love your explanation i wish you could do more DP problems like reg exp matching

  • @hackerman6769
    @hackerman6769 7 років тому

    Your explanation is awesome as well as your laugh... 😝

  • @ashishkumarsingh7487
    @ashishkumarsingh7487 6 років тому

    Luv you sir you made it very easy keep uploading videos.we are waiting desperately

  • @rico5146
    @rico5146 5 років тому

    This problem is similar as unbounded knapsack problem.
    This problem is also be implemented with 1d array.
    Both time complexity are Big O of n*m
    where n is total weight and m is the number of pieces.

  • @marioburgos8656
    @marioburgos8656 7 років тому +1

    Thank you very much. I finally got it!!!

  • @rachanaalu-upvc3927
    @rachanaalu-upvc3927 3 роки тому

    1d cut optimization formula excel me bana sakate he kya

  • @Rohitbhole1
    @Rohitbhole1 7 років тому +2

    Never understood dp until now.. thanks a lot

  • @benmontgomery1111
    @benmontgomery1111 2 роки тому

    Is the maximum number of cuts in any scenario using this algorithm, 2 cuts? Because that's what it is in this video. Just curious if it's always that way

  • @abhishektripathi7706
    @abhishektripathi7706 3 роки тому

    ThankYou so much for such an awesome explanation :)

  • @theWorldOfIss
    @theWorldOfIss 3 роки тому +1

    Thank you sir. Amazing

  • @ovipoddar2723
    @ovipoddar2723 6 років тому +1

    excellent video vai ! i felt much difficulty to understand DP! your explaination makes dp so easy ! please also add code in your videos! :

  • @singarigallapavankumar4724
    @singarigallapavankumar4724 Рік тому

    Nice teaching sir

  • @hemantthakur5380
    @hemantthakur5380 5 років тому

    6:42 confusing it should be
    it is not possible to make a rod of length 1 with pieces of length 2.
    but Explanation is really helpful.

  • @Krm1889
    @Krm1889 4 роки тому

    Use recursive strategy and store results in map to make it optimise.

  • @prateekgupta3122
    @prateekgupta3122 5 років тому

    But why does this formula work?

  • @aripakman
    @aripakman 7 років тому +3

    why are you using a 2D matrix when there is a solution using a 1D vector?

    • @mr.l3260
      @mr.l3260 6 років тому +2

      To explain the solution to you!

    • @nikhil199029
      @nikhil199029 6 років тому

      that uses a recursion! so internally another stack will be made

  • @chetanshrivastava3762
    @chetanshrivastava3762 5 років тому

    Great video sir.Thanks...

  • @ahmetkarakartal9563
    @ahmetkarakartal9563 2 роки тому

    thank you so much, you are so good.

  • @yadavrakesh5735
    @yadavrakesh5735 4 роки тому

    Nice explanation

  • @mdsidd2049
    @mdsidd2049 7 років тому

    awesome explanation

  • @umeshbhagtani1038
    @umeshbhagtani1038 2 роки тому

    thankyou very much sir for explaining

  • @NaturalPro100
    @NaturalPro100 7 років тому

    Great explanation...Made it simple :)

  • @ANANDJULU
    @ANANDJULU 6 років тому

    thanks for the nice explanation.

  • @mariam-em6hl
    @mariam-em6hl 6 років тому

    Thank you .Please explain optimal revenue

  • @anuragshahi111
    @anuragshahi111 7 років тому

    Easy to understand.Thanks

  • @ankitlohiya76
    @ankitlohiya76 7 років тому

    very good explanation

  • @vatsalhirpara5869
    @vatsalhirpara5869 7 років тому +1

    Thank you sir, understood. And please make video on matrix chain multiplication

  • @showstopper2488
    @showstopper2488 7 років тому +4

    very nice video . Please explain with code.

  • @imrwe9691
    @imrwe9691 7 років тому +1

    This guy is awesome❤

  • @arnobchowdhury1804
    @arnobchowdhury1804 4 роки тому

    hes the perfect example of indian guy teaching on UA-cam meme ♥️

  • @masudkhan2257
    @masudkhan2257 6 років тому +1

    man u just made me subscrib.....

  • @simplesurajkumar
    @simplesurajkumar 7 років тому

    Awesome expalnation...Please upload Mancher's Algorithm

  • @mnsayeed999
    @mnsayeed999 4 роки тому

    whuy does everyone strt filling the matrix to explain dp...DP is way more than manually filling matrices.

  • @AdityaKumar-ws5pv
    @AdityaKumar-ws5pv 7 років тому

    sir, please upload 3 4 more dynamic problem question it is very much helpful in understanding how to solve dp.Once again thank you very much sir.

  • @firozpasha2766
    @firozpasha2766 5 років тому

    Awesome explanation, please spend some time to take through pseudo code also.

  • @mdsaif4696
    @mdsaif4696 7 років тому

    code ?

  • @avnishgupta8731
    @avnishgupta8731 7 років тому

    Hi Can you please add the code also and traverse us through the code.

    • @vivekanandkhyade
      @vivekanandkhyade  7 років тому

      yes will make the video with the code..!

    • @shivambhadauria644
      @shivambhadauria644 4 роки тому

      @@vivekanandkhyade Hi, can you please upload the video for the code.

  • @atulchaudhary8055
    @atulchaudhary8055 5 років тому

    it would be great if you provide us with code also

  • @rajatgupta-ld1wg
    @rajatgupta-ld1wg 4 роки тому

    Good explaination! (y)

  • @AdityaKumar-ws5pv
    @AdityaKumar-ws5pv 7 років тому

    Sir please make a video solving this question-Largest subarray with equal number of 0s and 1s.

  • @lye1_1
    @lye1_1 6 років тому

    is already very clear if only look at the board

  • @amsainju
    @amsainju 7 років тому +31

    listen in speed 2x

  • @SitanshuNandanTheStansho
    @SitanshuNandanTheStansho 7 років тому

    Thanks for the video :)

  • @motivationworld3992
    @motivationworld3992 7 років тому

    sir make videos more on dynamic programming

  • @martin77778
    @martin77778 6 років тому

    nice lesson

  • @seko2922
    @seko2922 4 роки тому

    Very helpful

  • @swagatpatra2139
    @swagatpatra2139 4 роки тому

    Wonderful.

  • @hf1728
    @hf1728 9 місяців тому

    legend

  • @amadousallah8916
    @amadousallah8916 Рік тому

    Thanks a lot.

  • @googlepatel4052
    @googlepatel4052 5 років тому

    thank you. good one..

  • @mraali2692
    @mraali2692 Рік тому

    your answer is worng

  • @UmerKhan-ro3dy
    @UmerKhan-ro3dy 2 роки тому

    Thanks

  • @laraibanwar1618
    @laraibanwar1618 5 років тому

    you r the best though i speed the video but its too good

  • @thakurrajneeshpundir6262
    @thakurrajneeshpundir6262 5 років тому

    this can be done by greedy method

  • @usamatahir7091
    @usamatahir7091 5 років тому

    plz youtube, give us a 3x button

  • @RajeevKumar-ym7uf
    @RajeevKumar-ym7uf 7 років тому +2

    code ??. not useful without code.

  • @thesoftwareengineer17
    @thesoftwareengineer17 4 роки тому

    Nice

  • @rajeshadlinge7066
    @rajeshadlinge7066 6 років тому

    aapla manus ..

  • @ankithreddy7827
    @ankithreddy7827 4 роки тому

    nice

  • @debjyotiroy8391
    @debjyotiroy8391 7 років тому

    great

  • @garvpatel3071
    @garvpatel3071 4 роки тому

    24:22 😄

  • @Mariammunsifmir
    @Mariammunsifmir 5 років тому

    O slow motion :D

  • @MuzahidShaik-rr3tp
    @MuzahidShaik-rr3tp 8 місяців тому

    Bro is an internet explorer 😭

  • @prajitbanerjee8226
    @prajitbanerjee8226 6 років тому

    god

  • @alihussnain-jl9bd
    @alihussnain-jl9bd 4 дні тому

    worst explanation ever

  • @justinbreb7399
    @justinbreb7399 6 років тому +2

    To much boring lecture