4 Principle of Optimality - Dynamic Programming introduction

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

КОМЕНТАРІ • 424

  • @aankittcoolest
    @aankittcoolest 6 років тому +766

    So many complex things explained with so simplicity. No words for respect!. Thanks.

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

      Was that topic complex?

    • @shashanksagarjha2807
      @shashanksagarjha2807 4 роки тому +1

      please watch this playlist for detailed explanation of dynamic programming..ua-cam.com/play/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8.html..

    • @shashanksagarjha2807
      @shashanksagarjha2807 4 роки тому +1

      please watch this playlist for detailed explanation of dynamic programming..ua-cam.com/play/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8.html..

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

      @Esca Meredoff me 2

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

      R u bot

  • @maxvandoorn3040
    @maxvandoorn3040 5 років тому +278

    This playlist is more useful than my university course, thanks strijderrr

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

      Lol strijder xD, jij bent zeker Nederlands.

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

      please watch this playlist for detailed explanation of dynamic programming..ua-cam.com/play/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8.html..

  • @rohithkumar7851
    @rohithkumar7851 3 роки тому +1095

    use me as respect button

    • @ARU-THLESSGUY
      @ARU-THLESSGUY Рік тому

      u like to be used as a button 🥲🥲

    • @sivamuliki8799
      @sivamuliki8799 3 місяці тому +13

      There's a like button to like and subscribe to respect his teaching.No need buttons from you😅

  • @mantasarul
    @mantasarul 6 років тому +21

    You are one of the best teacher i have found online...in my university my respected faculty can teach but her ones might not be so much organized. You make complicated things so simple that I am bit relaxed now...I was panicking as I got my semester final in 2 days and there are so many things to cover...I really need to study and I am lucky and thankful to you and the Almighty that you have uploaded these videos...keep up the good works...not all heroes wear cape.

  • @mahdidi96
    @mahdidi96 3 роки тому +89

    Bari got me an A+ back in my junior year of college, now I'm using his help again when interviewing for a new job. You're the man Abdul Bari!

    • @gradientO
      @gradientO 2 роки тому +2

      Passed the interview?

    • @MrKai9000
      @MrKai9000 Рік тому +2

      Nope he failed😂😂😂

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

      @@gradientO Yessir, been workin like a slave at Amazon for 2 years. And what I've learned is that money ain't worth your happiness. There, I saved you this FAANG bullshit, now go be happy.

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

      Tell us, pl , did you passed?

    • @mahdidi96
      @mahdidi96 11 місяців тому +1

      @@bakeery yesssiirrr working at a Faang now

  • @abdoulhamidzeba9257
    @abdoulhamidzeba9257 Рік тому +4

    You are a great teacher. You explained in 15min what I couldn't understand in a 1 hour lecture. Thank you so much for these videos.

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

    Upto now I seen thousand of video for memoisation, but not ever get clarity. You represent it so nicely, so simply. Thank you sir. much respect from me!

  • @saroshfaisalkhan3531
    @saroshfaisalkhan3531 6 років тому +254

    Why they teach us complicated manner? n why are you teaching in simplification manner??Aye Allah apka bahot bahot shukriya k apne aise best teachers free available karwaye mujhe, Aye Allah Abdul Bari sir ko wo tamam khushiyan ata kar..Jo sir ne apse kabhi aapse maangi bhi na ho. Bahot Bahot shukriyah sir..!!

    • @saroshfaisalkhan3531
      @saroshfaisalkhan3531 6 років тому +22

      Assalam o alaikum,
      I am from Dr. Babasaheb Ambedkar Marathwada University, Aurngabad(Maharashtra).
      Bahot Bahot shukriyah sir for teaching us in such a nice way. Jazak Allah.

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

      please watch this playlist for detailed explanation of dynamic programming..ua-cam.com/play/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8.html..

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

      please watch this playlist for detailed explanation of dynamic programming..ua-cam.com/play/PLeF0b8iqbx4mTBJZ5ukIYj92_B4k2L1-8.html..

  • @radiagulzan
    @radiagulzan 4 роки тому +164

    this was so amazing. Sir you're blessed with incredible teaching skills mash'Allah!

    • @CodingWithPrakash_
      @CodingWithPrakash_ 4 роки тому +1

      ua-cam.com/play/PLzffTJx5aHaT-0K_b47KxScckZfDXAKF3.html

  • @hashjkbaaaa
    @hashjkbaaaa 4 роки тому +8

    Honestly, one of the best teachers I have seen so far

  • @yoddha621
    @yoddha621 3 роки тому +15

    Memoization is an optimization process. In simple terms, we store the intermediate results of the solutions of sub-problems, allowing us to speed up the computation of the overall solution. The improvement can be reduced to an exponential time solution to a polynomial time solution, with an overhead of using additional memory for storing intermediate results.

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

      Okay. But how does Dynamic Programming relate to that? And what of tabulation method, is it an optimization too, if so over what? Can the iterative implementation also be memoized? We can check and return the value if it exists in the array to speed it up too. Although, this was not discussed.

  • @priya-tl
    @priya-tl 2 роки тому +5

    Thank you so much sir! U have uploaded this 4years ago and it's useful for me 2 days before exam !

  • @darrellcleveland3052
    @darrellcleveland3052 4 роки тому +9

    This is the best explanation of Dynamic Programming that I've seen on UA-cam! Thank you Abdul, I subscribed to your channel.

  • @RajeshPaul38
    @RajeshPaul38 3 роки тому +3

    The best thing about your videos is that you cover all aspects of the topic. Love all the videos.

  • @raviyadav3586
    @raviyadav3586 6 років тому +23

    only one word for ur effort....RESPECT

  • @jakerecoulle
    @jakerecoulle 4 роки тому +5

    You're the best man! You're saving my life in Algorithms right now. Every video is so clear and simplified. Much appreciated

  • @slowmotion2300
    @slowmotion2300 5 місяців тому

    Probably the best teacher I've ever learned something from... Love from Germany.

  • @rpodder
    @rpodder 4 роки тому +4

    I just followed this YT channel before my Design and analysis of algorithm exam and was able to attempt smoothly 😌

  • @kshitijeminem
    @kshitijeminem 6 років тому +25

    Sir this is so incredible. Thank you for the most simplistic explanation to this. Subscribing for sure

  • @sushantkumar511
    @sushantkumar511 4 роки тому +3

    No one can explain it in simpler terms better than you, sir. Thank you

  • @arikhursheed224
    @arikhursheed224 3 роки тому +31

    When my teacher explains this topic I want to drop out of college! But your explanation is so easy and makes me stay in the college! :) Sir keep posting like these videos 👍👍

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

      So that we can complete our degree without taking drop out 😂😂

  • @rahmasamy7463
    @rahmasamy7463 3 роки тому +2

    if I say that 's the best playlist in algorithm I am not lieing..thanks very much!!

  • @idiot7leon
    @idiot7leon 4 роки тому +4

    Thank you, sir. I have never been so clear about these concepts that share a lot in common:
    recursion vs memoization vs tabulation vs dynamic programming!

  • @SeemaSingh-xg5hl
    @SeemaSingh-xg5hl 2 роки тому +2

    Good to see your calming approach in turbulent times....stay blessed...🙏🏻

  • @anirudhsharma2228
    @anirudhsharma2228 6 років тому +8

    Teaching lvl = pro !!!!
    amazing confidence while explaining hard topics so easily..

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

    Abdul bari is the GOD of Algorithms .Love your way of explaining things in such a simple way.
    From Pakistan

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

    Best explanation of memoization I have ever seen.

  • @varnanthirugnanasambandan559
    @varnanthirugnanasambandan559 2 роки тому +1

    You are one of the best DS trainers i know

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

    superb superb superb,i have watched the greedy methods algo and from now you are my best teacher in algorithms, thank you so much sir,because of you,i am getting confidence in algorithm subject.

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

    Sir you are best teacher for DSA. Thank you so much sir.

  • @christianjt7018
    @christianjt7018 4 роки тому +3

    You are an awesome teacher. Greetings from Mexico.

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

    No words to explain your style of teaching. Thanks, Dear! May Allah reward you.

  • @abdelahmad5799
    @abdelahmad5799 5 років тому +33

    Thank you for explaining in a simple way , i like it.
    from Denmark

  • @sharatpaul
    @sharatpaul 4 роки тому +7

    Great video sir!!!. Not only this one but the others also in the algorithm series. I dream if colleges and universities can have teachers like you someday.

  • @mosshead_vinsmoke
    @mosshead_vinsmoke 2 місяці тому

    exam in 1 hour -> this is completely new concept for me tysm...wish me luck

  • @mari72139
    @mari72139 Рік тому +1

    this sir is the goat! 👏Congratulations for your amazing skill of teaching!

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

    yes. this is my first video that I watched from you sir. Won't be last.

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

    Sir love you a lot. Every teacher really hardest method . Just watched your videos 3hours before exam and I went good. Good bless you sir please upload more videos

  • @achiever7025
    @achiever7025 10 місяців тому +2

    dynamic programming work like magic for fibonacci series...... from 2^n to n this is drastic

  • @ragibshahariar3169
    @ragibshahariar3169 3 місяці тому

    Sir you are a blessings.🙂
    I almost finishing you DSA course in c and c++ on Udemy.
    May almighty grant you paradise. your teaching is a cure for many of CSE students like us.

  • @ishankishank1458
    @ishankishank1458 4 роки тому +1

    I am from one of the Prestigious institution in India. I guess You're the only best teacher I've ever found.

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

    the greatest video I have ever seen for algorithm. Thanks very much!

  • @anujshaan1006
    @anujshaan1006 4 роки тому +1

    GOD ho sir aap literally
    you're the reason why teachers are called form of god

  • @MotoSapien99
    @MotoSapien99 Рік тому +1

    He deserves close to 3-4 million subs

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

    Always you find a easy way to explain things. This one was the best.

  • @87ussuraj
    @87ussuraj 4 роки тому +3

    Abdul Bari is GOD! How can he make things so simple!

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

    Sir u r a legend. best example for a teacher.......

  • @MetalBatros91
    @MetalBatros91 4 роки тому +71

    I dream of a day in which I will search for Dymamic Programming tutorials and Fibonacci won't show up

    • @TheAdityaVerma
      @TheAdityaVerma 4 роки тому +8

      I am a SDE at Flipkart,have a look at my DP playlist that actually landed me a great package job: ua-cam.com/video/nqowUJzG-iM/v-deo.html

    • @fomakandy
      @fomakandy 4 роки тому +1

      I I was thinking the exact thing

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

      @@TheAdityaVerma lol wahi se aaya hun bas idhar

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

      I was looking for the same thing

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

      well he was so many videos in DP this is just an intro in DP video. And actually his algorithm videos are seriously the best.

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

    Excellent presentation, Sir! Thank you very much for this outstanding video.

  • @kartik8n8
    @kartik8n8 2 роки тому +3

    Concepts and principles are timeless. So are your videos Bari sir. Thank you for making them.

  • @12Saqlain
    @12Saqlain 3 роки тому

    Amazing Sir Amazing Sir
    Baqi Tutors ne to sir dard kardia
    Aapka Lecture Sun ne k bad sare sar dard khatam
    Excellent Sir Excellent

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

    amazing sir ! kya baat he mahan ho aap. sab students k bleesings apko mil rahe ho apke ache kam k liye

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

    very lucidly explained somewhat complex concepts... really appreciate the effort and insights of the instructor. Great stuff.

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

    this is called the genuine teacher ..... 👏👏

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

      I am a SDE at Flipkart,have a look at my DP playlist that actually landed me a great package job: ua-cam.com/video/nqowUJzG-iM/v-deo.html

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

    Sir ... Ur the best.... The way of explaining is awesome... Thank u so much sir...

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

    You are too good, you have made knowledge open source... please keep doing it

  • @anushkakasera2069
    @anushkakasera2069 5 років тому +7

    The videos are awesome , but I request you to give us a sample of questions related to that topic at the end of the video so that our concept becomes crystal clear. you can reveal the answers of the questions in the next video lecture . This would be of great help to all the students .

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

      Sir you have the gift of breaking down complicated stuff and exposing underlying patterns.
      If you have time, some day you can try breaking down leetcode problems patterns. Am not suggesting solving all 1000 problems, but just have 10-15 lecture videos summarizing the theory behind multiple problems. Those could cover the most important 200 problems. Rest your students will solve by themselves.
      IITJEE preparation k baad pehli baar kuch us level ka dekha. Thank you Sir.

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

    I don't know but Abdul is a CHAD. THANKS SO MUCH!

  • @Sahilllll17
    @Sahilllll17 2 роки тому +1

    Just don't how to appreciate this work 🙇‍♂

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

    Dear Sir, You make these complex concepts looks trivial, hats off!

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

    The tabulation method of dynamic programming is actually fibonacci in iteration method.
    In the iteration method, we are only accessing the last 2 values. So this will work:
    a = 0; b = 1;
    for(int i = 2; i

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

      Why not memoize the iterative implementation too? We could check for stored values in an array and return them if they exist else do the computation. That way, the results of one computation could be useful in the next one. Can that be called memoization?

  • @SidIndian082
    @SidIndian082 Рік тому +1

    10:30 Excellent Explained Memiozation technique .. Sir :-)

  • @huhreenee
    @huhreenee 4 роки тому +1

    thank you so much sir! I am following your videos for GATE and they are really nice and elaborate!

  • @jzburns1990
    @jzburns1990 10 місяців тому

    This guy is the ultimate. Fantastic videos.

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

    This should be at the top of the yt search

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

    This is one of the best playlist for algorithms. Thank you sir!!

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

    As long time follower I would like to say that all of your explanations are top notch!
    The only thing that I wish you had done differently is the recursion part of Fibonacci. You divide the tree into 2 paths before the first call finishes (while you do say that it takes the left part first, the representation may confuse some students that do not have a solid grasp of recursion). The fib(n-1) should not be drawn until the left hand side is finished.

  • @lenovodolby7517
    @lenovodolby7517 4 роки тому +1

    Fibonacci has indic origin,in fact, not only did Pingala conceptualize the series (what we call as Fibonacci series today) as part of Chanda Shastra, but even extended it to the concept of a pyramid of stacked numbers which we call as “Pascal’s Triangle” today. However, during Pingala’s era, since Mount Meru was commonly used as a reference to the centre of Hindu civilization, he had called his stack of numbers as “Maatra Meru” which he had claimed converges towards the Golden Mean.

  • @unknownop4915
    @unknownop4915 2 роки тому +1

    Nice nice 👍 my teacher learn from your technique and give lecture in class

  • @akramsarkar7008
    @akramsarkar7008 4 роки тому +1

    I respect u sir. Ur explanation has always been easy to understand for me . Thanx sir

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

    Thank you sir! I owe my CS Degree to you

  • @harshad.j3216
    @harshad.j3216 5 років тому +1

    Very nicely explained sir! Concepts are well narrated... Thanks so much! This has brought in more interest in learning in depth on this topic and understand few more use case scenario where dynamic programming can be applied.

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

    rock star of the programming teaching world

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

    idk who disliked, but your'e the best sir :)

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

    my teachers see ur videos and explain in the class even though I found it difficult and I gave up on the subject but now I am getting so much interest in topics.
    I know that this is just because of your simple and cool explanation and the logic behind the complexity is taught clearly to understand the concept.
    Many Many thanks from all the Viewers sir.

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

    You always have simplicity explanation up in your sleeves. Great. Just keep it up.

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

    When i reached Dynamic Algortihm i wanted o stop learning informatik , but now i hae an ideer of what is it thx for all Sir

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

    A brilliant definition of principle of optimality found on the internet:
    "A problem is said to satisfy the Principle of Optimality if the subsolutions of an optimal solution of the problem are themesleves optimal solutions for their subproblems."

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

    Thank you sir
    You gave a hope to crack my sem exams

  • @emanurrahman7787
    @emanurrahman7787 3 роки тому +2

    In one word you are awesome

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

    Very crisp and simple explanation .Thanks a lot .

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

    I finally understand dynamic programming! thank you sir!

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

    Sir, pls check if this summary is right :
    Greedy Vs Dynamic:
    1) both used to solve optimisation problem - find maximum or minimum
    2) both start by selecting local optimal value - i.e. global optimum can be obtained by selecting local optimum.
    3) But greedy doesn’t change its choice/selection criteria while dynamic can change its choice/selection criteria (Greedy pre-define rule to solve the problem without changing at any step/sequence until final step). This is the main difference between Greedy & Dynamic.
    4) optimal solution to the problem contains optimal solution to sub-problems ie. problem can be solved by sequence by sequence - step by step.
    5) Greedy may not give correct (optimal) result always but dynamic always give correct (optimal) result.

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

    Sir, thank you sooo much for this clear picture of Greedy vs DP and Memoization vs tabulation

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

    I am here for the first time on this channel. So far, I've only heard his name and that he teaches so well.
    Agreed!
    It was sooo smooth and well done ✅
    Subs++;
    :)

  • @SRNR_PODCAST.
    @SRNR_PODCAST. 3 роки тому +2

    a gold mine in youtube

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

    itna acha samjhaty hain ap sir main to ap ki he videos dekhti hu God Bless you

  • @jana.9289
    @jana.9289 12 днів тому +1

    mash'Allah!
    amazing sir 💙

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

    Congratulation on 500K reaching sir

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

    for relation T(n)=2T(n-1)+1 we can't use masters theorem as b=1. 6:14

  • @徐伟-l9q
    @徐伟-l9q 6 років тому +7

    sir, you r videos give me a great help! Thks very much. I'm looking forward to your videos about Compilers & Operating Systems & Computer Architecture & and other computer science courses if possible. Thank you, sir!

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

    الله يوفق هذا الشخص ويجزاه كل خير

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

    Great ! Salute to U Sir

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

    Sir. Your videos are really awesome and helped the most. Thank you so much.

  • @rahulsharma-bj6pg
    @rahulsharma-bj6pg 4 роки тому

    I have a doubt sir ! At 11:00 you concluded the time complexity is n . But actually we stored them in array. So we need to search them in array. This may cost more time? Further increasing time complexity ?

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

    nice explanation of Memoization. Found very helpful

  • @mrshivamshaw
    @mrshivamshaw 7 місяців тому

    Such an amazing teacher❣❣

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

    You are great at explaining the concepts. Keep up the good work!!!!

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

    wow amazing very nice i am from pakistan . love you

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

    Awesome video! Your explanation is so simple and clear. Thank you Sir