Dynamic Programming isn't too hard. You just don't know what it is.

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ย. 2024

ความคิดเห็น • 668

  • @Tossen98
    @Tossen98 3 หลายเดือนก่อน +558

    The answer fits into a 32-bit integer
    “I don’t care, I’m using Python” 😂

    • @alansmithee419
      @alansmithee419 2 หลายเดือนก่อน +17

      Python so real for that

    • @w花b
      @w花b หลายเดือนก่อน +3

      Faaaacts

  • @novo99
    @novo99 3 หลายเดือนก่อน +677

    Bro is out here teaching us how to think

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +262

      Give someone a solution, you help them for that problem.
      Teach someone problem solving, you empower them for life.
      - ChatGPT

    • @amvsekai
      @amvsekai 3 หลายเดือนก่อน +10

      ​@@DecodingIntuitionit's same as give a man a fish he will eat for a day but teach him fishing he will eat for his entire life 😅

    • @ShidNoh
      @ShidNoh 3 หลายเดือนก่อน +28

      ​@@amvsekaiyeah but this one didn't come out of chatGPT so i'm not gonna believe it

    • @sahilshaw8342
      @sahilshaw8342 3 หลายเดือนก่อน +8

      Bro drops a banger and forgot to give us blanket 🥶🥶​@@DecodingIntuition

    • @scarymojo5809
      @scarymojo5809 2 หลายเดือนก่อน +1

      @@DecodingIntuition Goat status

  • @GeekOverdose
    @GeekOverdose 3 หลายเดือนก่อน +1607

    I think I clicked on the wrong type of DP

    • @garlic-os
      @garlic-os 3 หลายเดือนก่อน +87

      dr pepper

    • @tuna5618
      @tuna5618 3 หลายเดือนก่อน +66

      daft punk?

    • @primenumberbuster404
      @primenumberbuster404 3 หลายเดือนก่อน +57

      Deadpool?

    • @jawad9757
      @jawad9757 3 หลายเดือนก่อน +43

      Dark Purple

    • @jithu8018
      @jithu8018 3 หลายเดือนก่อน

      dik pusy? :3

  • @_viwty
    @_viwty 3 หลายเดือนก่อน +572

    >randomly appears
    >makes by far the best video about a programming concept i've seen yet
    keep going man

    • @tdot33367
      @tdot33367 3 หลายเดือนก่อน +15

      > accepts and elaborates
      > leaves
      big chad energy

    • @tan-os2ed
      @tan-os2ed 2 หลายเดือนก่อน

      Then you haven’t seen enough

  • @SauravKumar-em8pb
    @SauravKumar-em8pb 3 หลายเดือนก่อน +311

    Anyone can teach how to solve a problem but no one actually shows how to break a problem into solvable parts like you.
    Keep uploading man.

  • @Sjoerd-gk3wr
    @Sjoerd-gk3wr 3 หลายเดือนก่อน +499

    "big function has been lying to you"

    • @gr.4380
      @gr.4380 หลายเดือนก่อน +5

      I am now a firm believer in the conspiracy theory that it's all a plot from big function

    • @emanuelhanner
      @emanuelhanner 27 วันที่ผ่านมา

      @@gr.4380 Underrated comment 🤣😂

  • @kzelmer
    @kzelmer 3 หลายเดือนก่อน +134

    The worst problem about the Leetcode interview process is that is forcing engineers to memorize instead of thinking. If 20 years ago someone told me that in the future we will be selecting engineers based on a memorization process I would laugh.
    In a job market where everbody memorizes patterns an algorithms, these kind of breaking a problem in parts explanation is fresh air

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +49

      i really hate that too. I am a strong advocate for easier problems with more scrutiny on explanation and correctness.
      There's nothing more I want to see gone that questions that have an easy to remember trick solution and poorly trained interviewers just looking to hear THEIR answer.

    • @kzelmer
      @kzelmer 3 หลายเดือนก่อน +5

      @@DecodingIntuition indeed. It probably has a higher recruiting cost but I would rather evaluate the thinking process of a candidate instead of the same candidate faking that thinking process because he grinded that Leetcode exercise

    • @ShayPatrickCormacTHEHUNTER
      @ShayPatrickCormacTHEHUNTER 2 หลายเดือนก่อน +3

      It seems the mainstream just has to ruin everything. From tech, to Religion...everything.

    • @aminbusiness3139
      @aminbusiness3139 หลายเดือนก่อน

      Nah the industry aware of this and has actually made interviews 10X harder as a result of it

  • @azr_sd
    @azr_sd 2 หลายเดือนก่อน +10

    Cleanest DP intuition video on TH-cam, I have watched countless of them but this step by step like exactly how we think during an actual problem solving process is what connected with me. I really wish you make more videos but from the perspective of how a person who is leaning will think and solve it.

  • @rcj1337
    @rcj1337 หลายเดือนก่อน +5

    2:27 ”different view of not only DP, but also problem solving - as a hole” - I get it now, DP and holes go toghether, makes sense

    • @dev__noob_9299
      @dev__noob_9299 24 วันที่ผ่านมา

      I see what you did there ... 🧐

  • @mattb925
    @mattb925 3 หลายเดือนก่อน +151

    DP is controversial but I think it can be pleasurable for all parties involved

    • @_JoeVer
      @_JoeVer 3 หลายเดือนก่อน +2

      ???

    • @notsojharedtroll23
      @notsojharedtroll23 3 หลายเดือนก่อน +17

      ​@@_JoeVer you sweet little child 😂😂😂

    • @arcanea9598
      @arcanea9598 2 หลายเดือนก่อน

      @@_JoeVer google double penetration.

    • @diollinebranderson6553
      @diollinebranderson6553 28 วันที่ผ่านมา

      ​@@_JoeVer search up male dp

  • @kairos__
    @kairos__ 2 หลายเดือนก่อน +4

    This was genuinely mind opening. Thanks for this. It's not often you feel like you a video has made you better off after having watched it. My perspective on problem solving has improved having watched this. Now its all about practice.

  • @Stdvwr
    @Stdvwr 3 หลายเดือนก่อน +99

    DP is hard because the algorithms look like a complete enumeration, especially in optimization problems. Half of the process is to convince yourself that the memorization you've thought of saves enough time in your specific case. This approach with cached complexity simultaneously derives the algorithm (just enumerate every state via recursion) and calculates the complexity for you (the recursive call is O(1)). It is then easier to derive a non-recursive algorithm from the recursive, and the memorization table is a matrix with a dimension for every argument of the recursive call.

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +25

      Exactly! I'll show in the next video how that conversion to iterative is ridiculously simple.

    • @logans9616
      @logans9616 3 หลายเดือนก่อน

      @@DecodingIntuition Looking forward to that next video!

  • @JuliaC-mz8qy
    @JuliaC-mz8qy 3 หลายเดือนก่อน +274

    Primeagen : “CoIn cHaNGe iS hArD”
    DecodingIntuition: “…hold my beer…”

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +81

      To be fair, it is really hard if you don't know that DP is not about drawing arrows on random tables. Once you get comfortable with the idea that you can efficiently use a recurrence relation to simulate all possibilities, coin change really does become as easy as "take the coin or skip the coin" :)
      I'd really love for him to see this video and see if it changes his mind about it, because he's a smart guy and I'm sure if he knew what dp actually was he wouldn't have spent over an hour on it trying to pass art class

    • @NihongoWakannai
      @NihongoWakannai 3 หลายเดือนก่อน +3

      tbh I found coin change II a lot easier than coin change

  • @elichen3667
    @elichen3667 2 หลายเดือนก่อน +2

    This way of thinking actually changed how I view/approach these types of problems. Thank you!

  • @hedgehogsch.7270
    @hedgehogsch.7270 3 หลายเดือนก่อน +106

    "reject the callstack"
    "return to math"

  • @tejasvenky5538
    @tejasvenky5538 3 หลายเดือนก่อน +62

    This is going to go viral, the best educational DP video I've seen

  • @AsmodeusMictian
    @AsmodeusMictian หลายเดือนก่อน +1

    Really just getting started into programming and a friend sent this video to me. I think I got quite a bit of it, but this gives me SO much stuff to go and track down and learn. THANK YOU!

  • @linkylog
    @linkylog 3 หลายเดือนก่อน +90

    Please, I need you to MAKE MORE VIDEOS. I don't care if it's about the most useless data structure or algorithm of mankind, with this video you show that intuition and the process of building a solution is imperative to understand whatever THE solution to the problem means, even if it's a hard problem. I urge you to keep making videos, you help people like me (too much). I REALLY appreciate the time people like you take to explain any concept. Thank you very much.

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +8

      I'll try :) Thanks for the support!

    • @Hellbending
      @Hellbending 3 หลายเดือนก่อน +7

      @@DecodingIntuitionanother person here - I share one for one, exactly what this person has said.
      There really is NOT a lot of people on TH-cam that walk through the ENTIRE problem AND process. Please continue making content bro 💪🙏

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +11

      @@Hellbending That's my goal! I don't just want to tell you why I know a solution works, I want to show how I arrive at it. There's plenty of great content that explains why things work, but I'm here to try to fill the gap for the other :)

    • @midas6659
      @midas6659 3 หลายเดือนก่อน +3

      Agreed. Also subscribed 🔥

  • @aayushyadav3365
    @aayushyadav3365 2 หลายเดือนก่อน +2

    I started Programming two months ago with high intent to go competitive. This is my favorite vids as of now that makes me comeback for another watch every 2-3 days or so. Absolutely beautifully taught

  • @peony6666
    @peony6666 2 หลายเดือนก่อน +3

    this is a concept i've struggled for so long with THANK YOU

  • @xamspanda
    @xamspanda 3 หลายเดือนก่อน +8

    Some of the best vids on youtube are engaging, entertaining, and educational, and you nailed all three. Genuinely great vid

  • @andrewcarroll9738
    @andrewcarroll9738 2 หลายเดือนก่อน +12

    "a name so long you might think it's proprietary" is legitimately the funniest joke I've heard this week.

  • @michaelmroz7433
    @michaelmroz7433 2 หลายเดือนก่อน +2

    You got me so hard with that prime hook. Almost closed the tab on instinct, thinking I had made a mistake. Love math, love memes, love this video.

  • @emmm_5787
    @emmm_5787 3 หลายเดือนก่อน +2

    This is the video I needed after suffering with DSA, thank you for breaking technique this down!!

  • @uima_
    @uima_ 3 หลายเดือนก่อน +1

    THANK YOU, this video is really opened my mind. I have solved 300 problems on Leetcode, and I can solve most DP problems, but my confidence on DP is little. Your process to observe/break down a problem is phenomenal, and I feel like it just should like this all the time. I will share video to all my friend who can code, and just try to solve the two DP problems that I can't solve.

  • @404waffles
    @404waffles หลายเดือนก่อน

    awesome vid, coin change being the example here is a huge bonus for me because that problem has been fucking with my head for a while even after looking up the solution

  • @takeuchi5760
    @takeuchi5760 3 หลายเดือนก่อน +1

    This video is so good. Not just for DP, but general problem solving. Also, I really appreciate the notes slides you put in the video, that saves a lot of time and helps me understand the content better. Instant sub.

  • @foreverskeptical1
    @foreverskeptical1 2 หลายเดือนก่อน +4

    20:28 This meme highlights the main misconception I have had forever, also loved the department of defense trivia. Holy moly the fact that no one ever mentioned or highlighted that recurrence relation != recurrence execution to me before is such a scam. In fact I was made to think recurrence execution is what happened in the call stack (even though I didn't know how physics allowed it). SOOO GLAD to have cleared it up. Drawing down the entire trace graph of calls always got me stuck and felt unintuitive, since I didn't know how my computer processed it. I also got lost when drawing it down.
    "Decisions are Values to compute once and not task to run every time" THIS QUOTE AND VIDEO IS LIFE CHANGING
    Its funny I got a non-dev job as a new cs grad, but videos like these are perfect/motivating as I love problem solving and want to keep my skills sharp even if my work right now is in a different field. Since problem solving is a universal skill. Can't wait for the next video since I never truly understood memoization and other space/time optimization that people usually did when solving such DP problems. Or even other LC type problems. I just love that you are focusing on problem solving more than just leetcode, please keep it up!!!! This is a niche (math/cs/leetcode/problem solving) that i always thought lacked good youtube content.

  • @Kdrahul96
    @Kdrahul96 2 หลายเดือนก่อน +2

    We need more of these breakdowns like this!!

  • @wonky1k
    @wonky1k 3 หลายเดือนก่อน +2

    The DP section of this video is good, but the greater value I garnered from this was ACTUALLY applying the breaking-down-the-problem strategies we are taught when approaching leetcode-style problems. These are things I have been told countless times but have struggled to break things down to their core components, but after watching you do it in this video it has really revitalized my confidence. Well earned like and sub, keep up the great work! Would love more videos like this.

  • @bibekjha8129
    @bibekjha8129 3 หลายเดือนก่อน +1

    Loved the video for so long I have been confused about DP man keep the good work, sending this video to all of my friends right now.

  • @Flourish38
    @Flourish38 3 หลายเดือนก่อน +1

    This video is amazing! The confidence you express your ideas with, combined with you immediately backing them up, really helps the ideas settle in my head. I especially liked the example problems at the end, after watching the video I had no trouble at all, which is usually not the case for videos claiming that something is "easy". I didn't even especially struggle with dynamic programming in school, but this definitely helped cement my foundations. Thank you!

  • @verysussdev
    @verysussdev 3 หลายเดือนก่อน +3

    Please do make these kind of videos more often, I am a software engineer for over a decade now and I feel to go back to roots again just because of this video :)

  • @sloppycee
    @sloppycee 3 หลายเดือนก่อน +14

    You wtf, you actually made it make sense! The missing insight for me was the term and bounds; the way you put it in a table was the missing piece.

  • @dIancaster
    @dIancaster 24 วันที่ผ่านมา

    You are a goddamn machine. I'm in awe. The way you knew it would pass even before running it? I'm so deeply impressed.

  • @axpg1297
    @axpg1297 หลายเดือนก่อน

    Best leetcode explanation I've ever seen in my life. Please keep making more videos.

  • @sct848
    @sct848 3 หลายเดือนก่อน +3

    Best breakdown I’ve ever seen. Will probably watch a few more times to fully understand. Hoping you’ll upload more Leetcode videos

  • @learnitmyway5848
    @learnitmyway5848 2 หลายเดือนก่อน +1

    bro i don't know how to thank you. you changed the entire perspective i held. sorry for following u so late

  • @discodansin7339
    @discodansin7339 3 หลายเดือนก่อน +1

    This was excellent, thank you 👍. Trying to identify a recurrence relation is a very implementable strategy for solving problems

  • @jmbf4191
    @jmbf4191 2 หลายเดือนก่อน +1

    I didn't quite understand the video but base on the comments saying how good this information is, I subbed!

  • @yanallboutros3533
    @yanallboutros3533 3 หลายเดือนก่อน +5

    The density of knowledge per meme in this video is A+

  • @WilliamWang-m4i
    @WilliamWang-m4i 18 วันที่ผ่านมา

    I see wisdom and clarity. Thank you.

  • @ADHDunce
    @ADHDunce 2 หลายเดือนก่อน +11

    "If everyone keeps their promise, everyone will end up happy." bro just solved world peace in a programming video

    • @GRAYgauss
      @GRAYgauss 2 หลายเดือนก่อน

      You call making everyone keep their promises a solution? If it's not actionable, how can it be a solution?

    • @ADHDunce
      @ADHDunce 2 หลายเดือนก่อน

      @@GRAYgauss it's only "not actionable" if people make promises they cannot keep. it's a simple rule of thumb: if you aren't sure you can keep your promise (to the best of your ability within your control), don't promise. extenuating circumstances such as death and traffic apply.
      for our own sanity, we must assume that lexical and logical ambiguities of promise statements have been previously resolved and agreed upon by all involved parties.
      for example:
      Scenario 1 - Alice knows they have (2 + n) chocolates in their chocolate tin, such that n > 0. Alice promises Bob 2 chocolates from their tin. Alice then gives Bob 2 chocolates from their tin. Nobody knowingly made impossible to keep promises, everybody's happy.
      Scenario 2 - Alice knows they have only 1 chocolate in their chocolate tin. Alice promises Bob 2 chocolates from their tin. Alice is clearly lying and should not be trusted with the secrets of Quantum Physics. Oh, and not to keep promises, either.
      Scenario 3 - Alice knows they have (2 + n) chocolates in their chocolate tin, again such that n > 0. Alice promises Bob 2 chocolates from their tin. When Alice and Bob open the tin, the chocolates are all melted. "It's okay," Bob says. "It was only thermodynamics." Nobody knowingly made impossible to keep promises, everybody's happy.
      feel free to ask any questions or present your viewpoint. i'm happy to discuss my viewpoint on this subject further.

    • @jansustar4565
      @jansustar4565 2 หลายเดือนก่อน

      "I promise i wont be happy"
      Checkmate

    • @ADHDunce
      @ADHDunce 2 หลายเดือนก่อน

      @@jansustar4565 "Checkmate," he says, throwing his own king off the edge of the board.

    • @vlc-cosplayer
      @vlc-cosplayer หลายเดือนก่อน

      I will NOT keep my promises because I'm lazy and silly and will eventually end up breaking some of them

  • @saulpng
    @saulpng 3 หลายเดือนก่อน +2

    always had trouble grasping my head around DP problem but this refresh perspective cleared up so much stuff. thanks for the content!

  • @vikrantsinghbhadouriya4367
    @vikrantsinghbhadouriya4367 3 หลายเดือนก่อน +22

    after an year of being into the DSA space, I've now realised that I had not improved my problem solving capabilities by much. I just learnt the concepts that were being taught, and developed pattern matching abilities, NOT PROBLEM SOLVING ONES.
    Also, Now's the time I realise that the reason I love math is because I could develop the pattern matching skills within a short period of time, thus acing my tests.
    Thanks for changing the way I thought about math, cs and problem solving in general. This beginner shall now set on the voyage to become a problem solver, a great one, god willing.

    • @ShayPatrickCormacTHEHUNTER
      @ShayPatrickCormacTHEHUNTER 2 หลายเดือนก่อน

      I mean, math having formulas and all, is very easy to abuse with the pattern matching llm like approach.

    • @Hngoc.Le.404
      @Hngoc.Le.404 หลายเดือนก่อน

      What’s DSA may I ask

  • @rot26-o3h
    @rot26-o3h 3 หลายเดือนก่อน +9

    The part about time complexity and thinking about the size of call stack in terms of unique states is really great, I've never though of computing the complexity that way before even though it seems intuitive when you actually think about it

  • @brandonprescott5525
    @brandonprescott5525 3 หลายเดือนก่อน +1

    Whoa! This was amongst the best videos on DP that I've watched.

  • @dbp_patel_1994
    @dbp_patel_1994 3 หลายเดือนก่อน +1

    Looking forward to more videos. Loved your explanations! Thank you so much!

  • @franciscobrizuela766
    @franciscobrizuela766 3 หลายเดือนก่อน +1

    Omg it's so good to have videos like this. Thanks, man!

  • @thorincokenshield
    @thorincokenshield 3 หลายเดือนก่อน +4

    Your analogy of treating every function call as a "state" with some fixed value and some state variables really helped clarify dynamic programming for me.
    I bet there's going to be O(views_on_this_video) increment in dp solves on leetcode now😅

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +8

      I am O(so_happy_it_made_sense) for you

  • @SeanSpillane
    @SeanSpillane 2 หลายเดือนก่อน +3

    These videos are very thought-provoking. I really like the presentation of this concept, which has traditionally been hard to follow. One request: I have found that the best way to truly integrate a new concept is to have both a good explanation, and also several fully worked examples. This lets me “triangulate” the concept better. Would you consider uploading a third video where you just work two or three full examples using your approach. No need for a lot of explanation, your first two videos cover that, just provide several examples we can use to triangulate the essential characteristics of this tricky concept?

    • @DecodingIntuition
      @DecodingIntuition  2 หลายเดือนก่อน +2

      Thanks for the suggestion. I probably will at some point.

  • @kristenwright5281
    @kristenwright5281 3 หลายเดือนก่อน +4

    So well done! One of the best videos on DP

  • @ddibwynt4437
    @ddibwynt4437 3 หลายเดือนก่อน +2

    I can’t believe this is your first video! Amazing explanation and entertaining. I would take a course taught by you!

  • @tagberli
    @tagberli หลายเดือนก่อน

    Best explanation on the entire planet, the world needs you, man

  • @anjal905
    @anjal905 3 หลายเดือนก่อน +1

    This actually helped me 10x my leetcode solving. It was basically me doing the rubber duck technique, but it worked

  • @mxpph
    @mxpph 19 วันที่ผ่านมา

    this is the greatest educational video ive ever seen on this entire platform

  • @mehulparekh619
    @mehulparekh619 3 หลายเดือนก่อน +12

    Future big tech youtuber right there.

  • @swayamjoshi7667
    @swayamjoshi7667 3 หลายเดือนก่อน +3

    Man, this video was actually so good and well explained you earned a sub keep uploading more about DSA and Competitive Coding

  • @jomamaiscool415
    @jomamaiscool415 3 หลายเดือนก่อน

    @theprimetime should check this out.
    This is an excellent breakdown of dynamic programming. Hope you put more videos up, thank you for putting this together.

  • @mklabtech
    @mklabtech 3 หลายเดือนก่อน +2

    Great video! Looking forward for more. Moving away from tables is a really helpful approach

  • @mindkill
    @mindkill 3 หลายเดือนก่อน +1

    This is great. Never been this excited for a next upload

  • @SyedAquibAteeq-dj7dz
    @SyedAquibAteeq-dj7dz 3 หลายเดือนก่อน +2

    Great video, thanks for your time and effort!!! Pure Gold tbh

  • @sunviewer7
    @sunviewer7 3 หลายเดือนก่อน +2

    I know this subject through and through, and still watched it through just cause it’s so damn good

  • @danielbinoy
    @danielbinoy 3 หลายเดือนก่อน +1

    This is the greatest explanation of DP I have ever seen

  • @whyareyoulookingatthislol
    @whyareyoulookingatthislol 3 หลายเดือนก่อน +1

    Very good video.
    I got a google thing in my gmail and I am not as acquainted with leetcode style problems as I should be. I will do the notetaking methods next time I get the chance to do coding problems. Having all the info right there and breaking it down live seems like a good thing to do. Thank you!

  • @AizakkuZ
    @AizakkuZ 3 หลายเดือนก่อน +1

    Exceptional video, this makes code problem look fun for me

  • @nadeem-cp9is
    @nadeem-cp9is 3 หลายเดือนก่อน +1

    this is seriously awesome, keep up good work, you're gonna go big on youtube if you keep this up, thank you so much

  • @qwe14205
    @qwe14205 2 หลายเดือนก่อน +2

    Dude, that was some quality content.

  • @rwilson5601
    @rwilson5601 3 หลายเดือนก่อน +2

    definitely want more of this. thank you

  • @joemoonwhitehead
    @joemoonwhitehead หลายเดือนก่อน

    Funny as fuck. Insightful as hell. If my maths teacher was as enthusiastic as you I'd likely have learned what inductive thinking actually was.

  • @vinitsharma4787
    @vinitsharma4787 2 หลายเดือนก่อน +1

    It will be better for us if u solve this problem in first go , does'nt matter how much time u take but that first time thought process of yours give us more value .

  • @wamvy5151
    @wamvy5151 3 หลายเดือนก่อน +1

    This has to be the best video on DP. Hope you make more videos on other topics.

  • @lazyFox99
    @lazyFox99 2 หลายเดือนก่อน +1

    Holy what a great video, instantly subbed

  • @EverAfterBreak2
    @EverAfterBreak2 3 หลายเดือนก่อน +1

    Bro just randomly appeared uploaded the best DP explanation video ever.

  • @lazyplayer1
    @lazyplayer1 3 หลายเดือนก่อน +15

    I seriously look at coding problems differently now

    • @ai_backend
      @ai_backend 2 หลายเดือนก่อน

      Same

  • @MatthewKelley-mq4ce
    @MatthewKelley-mq4ce 3 หลายเดือนก่อน +2

    Banger out of nowhere. Thanks for the guidance, though in general you're approach comes with deliberate practice. (Easier for some than others off the bat)

  • @ConductiveFoam
    @ConductiveFoam 3 หลายเดือนก่อน +1

    Phenomenal video
    I always thought I was missing something when learning about DP because it never seemed too difficult. I'll blame it on gettig really into Haskell an Type Theory before, that apparently prepared me for it.

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +1

      You know Haskell actually was what helped me define DP the way I did. Because I knew you could do DP in Haskell, but I was like "wait how do they do that without mutating state" since Haskell is pure.
      So I looked into it and that's when I realized that, because Haskell is pure, caching functions isn't actually modifying state. All Haskell functions are mathematical definitions, so the same input is the same output. Haskell also does lazy evaluation, so it doesn't execute any calculation unless it's needed.
      So that's where I got the idea. Recursive terms are values, not tasks. All this time, I've viewed recursion in terms of trees and call stacks, but to Haskell that's just one implementation; it's not the only one.

    • @ConductiveFoam
      @ConductiveFoam 3 หลายเดือนก่อน +1

      @@DecodingIntuition it's such a funky language. I love that the perspective shift it requires has this broader utility

  • @HL65536
    @HL65536 หลายเดือนก่อน +1

    This is how I coded Fibonacci in 10th grade. Nobody believed me at first when I said I implemented it recursively in O(n).

  • @aayushashokkashyap
    @aayushashokkashyap 3 หลายเดือนก่อน +2

    It's your first video? Man, it's awesome. I already subscribed midway the video. Gimme some MOAR!!

  • @harivarsha4016
    @harivarsha4016 3 หลายเดือนก่อน +1

    I'd love it if you could share resources to learn such cool stuff or any materials you've used for this video. This is super helpful and thank you for this !!!

  • @neves26
    @neves26 3 หลายเดือนก่อน +1

    Cracked video. I expect this one to make the rounds on X in about a week or two, good luck

  • @zmurszaypatafian9134
    @zmurszaypatafian9134 3 หลายเดือนก่อน +1

    Great video, this is the youtube recommendations I want to get!!!

  • @hikari1690
    @hikari1690 3 หลายเดือนก่อน +2

    Nice video. Can feel you having fun and I had fun watching too haha

  • @nibaba420
    @nibaba420 2 หลายเดือนก่อน +1

    simplify problems with a recurrence relation
    and recognize that naive recursion
    is not our only option
    recursive top down memoization
    iterative botton up tabulation
    are the two implementations...
    nice

  • @riddhivekariya9086
    @riddhivekariya9086 14 วันที่ผ่านมา

    We'd worship you , if you keep uploading man

  • @saifullahsaeed1990
    @saifullahsaeed1990 3 หลายเดือนก่อน +3

    man please make more leetcode solution videos or stream you explain very well

  • @whiteandy
    @whiteandy 3 หลายเดือนก่อน +2

    Very helpful perspective, waiting for the Advent of code to try it😊

  • @achillesvz
    @achillesvz 3 หลายเดือนก่อน +1

    Nah bro is actually goated 😭

  • @nicholasmascioni3333
    @nicholasmascioni3333 3 หลายเดือนก่อน +2

    This was excellent, great job!

  • @glutton404
    @glutton404 3 หลายเดือนก่อน +1

    Noo, I wanted to check out more videos from you but this is the only one.

  • @awesomegamer31
    @awesomegamer31 3 หลายเดือนก่อน +1

    Thanks so much for this. This was really fun to watch.

  • @deleted-u5g
    @deleted-u5g 3 หลายเดือนก่อน

    I knew how to use dynamic programming before I knew how to write a class. Easiest shit ever. In fact that's what made me get into programming.
    I started reading a book called "Eloquent Javascript" and all I knew at that point was writing Google Sheets formulas.
    I took me reading quite a few chapters before I even tried to console.log a "Hello World!" string!
    And what made me try it was reading about recursion on that (or next) chapter (I don't remember).
    So at that point I already had an idea how to break down a dynamic problem down to it's units top-to-bottom and then be able to solve the problem from it's simplest form with a bottom-to-top approach.
    P.S.
    At this point I had not even written any imperative code (since I assumed that's easy and it's not even what would help me solve any real problems).
    I wrote my firts for loop statement (in Python) only like a month later in fact I did so trying to come up with my own recursive problems.

  • @futurisold
    @futurisold 3 หลายเดือนก่อน +1

    I love this video in more ways than you can count

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +1

      Maybe I can use dynamic programming to figure it out, but I'll skip thinking about that and just take the compliment :) Glad you enjoyed it!

  • @zhijieli5503
    @zhijieli5503 3 หลายเดือนก่อน +1

    This is really clean explanation and thought process for problem solving in general, however I believe this is a greedy backtracking solution and not dynamic programming.

  • @pedro_soares_bhz
    @pedro_soares_bhz 25 วันที่ผ่านมา

    Damn, that is beautiful reasoning right there!

  • @leeroymlg4692
    @leeroymlg4692 3 หลายเดือนก่อน +1

    Really great video! I haven't seen an explanation so in depth and clear.
    One suggestion I have is to keep the energetic inflection in your voice as you're going over the problem. The voice over parts are great, but then it cuts back to the problem breakdown and you have a more monotone voice. It would make it more engaging and consistent if you kept the same enthusiastic inflection throughout the video 🙂

    • @BrainDevSWE
      @BrainDevSWE 3 หลายเดือนก่อน +3

      I love how the energy changes from when he's problem solving and doing the voice over.

  • @oldmajor5240
    @oldmajor5240 3 หลายเดือนก่อน +1

    this video is awesome! Liked and subscribed. I already had a look at your leetcode solution headings and the names scare me. Definitely gonna check those out later.

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +1

      Lmaooo, don't worry about those! They are interesting, but incredibly niche algos that will never really come up until you are deep into competitive programming. Thanks for the support!

  • @Osaiken
    @Osaiken หลายเดือนก่อน +1

    FIRE!!!!!!
    THIS IS WHAT REAL PROGRAMMING IS¡

  • @nolan_meyer
    @nolan_meyer 29 วันที่ผ่านมา

    20:17
    re: Richard Bellman
    “I spent the Fall quarter (of 1950) at RAND. My first task
    was to find a name for multistage decision processes.
    “An interesting question is, ‘Where did the name,
    dynamic programming, come from?’ The 1950s were not
    good years for mathematical research. We had a very inter-
    esting gentleman in Washington named Wilson. He was
    Secretary of Defense, and he actually had a pathological
    fear and hatred of the word, research. I’m not using the
    term lightly; I’m using it precisely. His face would suffuse,
    he would turn red, and he would get violent if people used
    the term, research, in his presence. You can imagine how he
    felt, then, about the term, mathematical. The RAND Cor-
    poration was employed by the Air Force, and the Air Force
    had Wilson as its boss, essentially. Hence, I felt I had to do
    something to shield Wilson and the Air Force from the fact
    that I was really doing mathematics inside the RAND Cor-
    poration. What title, what name, could I choose? In the first
    place I was interested in planning, in decision making, in
    thinking. But planning, is not a good word for various rea-
    sons. I decided therefore to use the word, ‘programming.’
    I wanted to get across the idea that this was dynamic, this
    was multistage, this was time-varying-I thought, let’s kill
    two birds with one stone. Let’s take a word that has an
    absolutely precise meaning, namely dynamic, in the clas-
    sical physical sense. It also has a very interesting property
    as an adjective, and that is it’s impossible to use the word,
    dynamic, in a pejorative sense. Try thinking of some com-
    bination that will possibly give it a pejorative meaning.
    It’s impossible. Thus, I thought dynamic programming was
    a good name. It was something not even a Congressman
    could object to. So I used it as an umbrella for my activi-
    ties”
    www.researchgate.net/publication/220243993_Richard_Bellman_on_the_Birth_of_Dynamic_Programming

  • @kieranmckenzie2995
    @kieranmckenzie2995 3 หลายเดือนก่อน +2

    Great vid thanks! Kinda funny that something triggered you enough to make this amazing content, I hope more things trigger you in the future :)

    • @DecodingIntuition
      @DecodingIntuition  3 หลายเดือนก่อน +2

      dw I have really thin skin and get triggered easily, so more to come :)