What can “The Simpsons” teach us about Dynamic Programming?

Ғылым және технология

An introduction to dynamic programming, how to approach these types problems, and we'll step through a few basic ones.
🛒 Recommended books (on Amazon): www.amazon.com/hz/wishlist/ls...
❤️ Support me on Patreon: / simondevyt
🌍 My Gamedev Courses: simondev.teachable.com/
Disclaimer: Commission is earned from qualifying purchases on Amazon links.
Follow me on:
Twitter: / iced_coffee_dev
Instagram: / beer_and_code
Github: github.com/simondevyoutube/
Covering dynamic programming, top down vs bottom up approaches. What is memoization and tabulation. Will also answer a few quick problems like the Fibonacci series, Coin Change, Min Path Sum, 0-1 Knapsack, Subset Sum, and the Staircase problem.

Пікірлер: 179

  • @HellgateDragon
    @HellgateDragon2 жыл бұрын

    choosing a name "because it sounded impressive" feels very much like a developer thing to do!

  • @mrpedrobraga

    @mrpedrobraga

    2 жыл бұрын

    We call that Impressiveness Maximization Naming Schemes.

  • @gloverelaxis

    @gloverelaxis

    Жыл бұрын

    there is nothing worse. i fucking hate people that make future things harder to learn by naming them poorly

  • @JorgetePanete

    @JorgetePanete

    Жыл бұрын

    @@leeroyjenkins0 What you're referring to as Linu- ah, carry on

  • @Takyodor2

    @Takyodor2

    Жыл бұрын

    ​@Jorge C. M. I use Arch btw.

  • @literallydeadpool

    @literallydeadpool

    Жыл бұрын

    @@mrpedrobraga *Perceived Impressiveness Optimization and Maximization Nomenclature Enhancement Proposal

  • @BrandonSolo
    @BrandonSolo2 жыл бұрын

    You just broke down this problem of understanding Dynamic Programming into subproblems that were so much easier to understand! I literally just had my teacher take 4 hours of class in total to explain this and you did it in under 15 minutes. You of course have earned a new subscriber.

  • @larryd9577

    @larryd9577

    Жыл бұрын

    Well then you in total spend at least 4 h and 15 minutes on understanding this problem.

  • @Anteksanteri

    @Anteksanteri

    Жыл бұрын

    @@larryd9577 That's awfully charitable towards traditional education :(

  • @randall2158

    @randall2158

    Жыл бұрын

    @@larryd9577 Yeah I love how people ignore priming the idea and then when they revisit it they think they were taught correctly.

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

    The fact that dynamic programming was named because it sounded impressive makes me feel better that my open source project got it's name because it sounded like something an open source project would be named.

  • @jacobschweiger5897

    @jacobschweiger5897

    Жыл бұрын

    which project did you create?

  • @Kenionatus

    @Kenionatus

    Жыл бұрын

    Yeah, your approach is way better because it communicates something relevant.

  • @derpoblizist9076

    @derpoblizist9076

    Жыл бұрын

    Just randomly appending -ng to my open source projects to sound legit

  • @buzbuz33-99
    @buzbuz33-99 Жыл бұрын

    The word "dynamic" usually implies that time is an element of the problem (as opposed to static). However, as far as I can tell, the only role time plays here is that it takes time to run the programs. I'm glad you are here to explain this to us.

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

    I've never heard that dynamic programming solutions include memoisation until now. Recursive algorithms that seemed slow and restricted to me now make so much more sense!

  • @arshadpakkali
    @arshadpakkali2 жыл бұрын

    You are like fireship but MORE nerdy ❤️

  • @swoorp
    @swoorp2 жыл бұрын

    Dynamic programming can come as a lot of those intimidating subjects, BUT not if the teacher is Simon!

  • @JuanGonzaloCarcamo
    @JuanGonzaloCarcamo2 жыл бұрын

    I’m really impressed with your content. I wonder why you don’t have a million subscribers yet. Thanks for taking the time and explain these tricky concepts in such an approachable way!

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

    I've written DP algorithms multiple times for comparing discrete sequences which is the min path sum problem you described. Or finding the minimum cost path through a 2D matrix from the bottom-left to the top-right. There are a few different ways to write it depending on how general you need it to be. It easy to lose sight of the generality of DP but you described it really well. Thanks

  • @MagnusBorregaard
    @MagnusBorregaard2 жыл бұрын

    I thoroughly enjoy your videos! As a web developer I find it extremely cool that you are talking about complex topics, but ground it in javascript and web browsers. I am looking forward to more game / 3D videos as well!

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

    Wow, easily the best tutorial on the intimidating Dynamic Programming topic! Thank you very much!

  • @stevecooper9988
    @stevecooper99882 жыл бұрын

    Simon, thank you so much for being a presence on the internet. As someone in the industry with big dreams, your guidance is of great value to me and I hope one day to pick up new tasks and build things like you can.

  • @simondev758

    @simondev758

    2 жыл бұрын

    My pleasure!

  • @liviuq
    @liviuq2 жыл бұрын

    First time viewer. We were taught DP in uni. This clip should be included in the References section. It is really intuuitive what you say. Thanks for this!

  • @beerus6779
    @beerus67793 ай бұрын

    fibonacci is dead simple if you use a loop where i < n-2. In the loop do: next = a+b; a=b; b=next; and then return next after the loop.

  • @Draco-wq1ch
    @Draco-wq1ch2 жыл бұрын

    1:06 this guy sneaks in the most hilarious easter eggs with inspect element

  • @MYMPSWORLD
    @MYMPSWORLD2 жыл бұрын

    You blew my mind. I was so afraid of DP before but you made it look so simple. Will definitely get back to SP again now

  • @jeffwells641

    @jeffwells641

    2 жыл бұрын

    Yeah, at it's core it's just keeping a record of what you've already done so you don't have to do it again. For repetitive problems this can lead to some crazy efficiency gains. I think Fibonacci is so popular as an example because the difference between a memoized and non-memoized recursive Fibonacci algorithm is so stark, it really drives the benefits home. Like, a modern PC will struggle building out Fibonacci trees past 50 for the non-memoized version, but numbers in the millions aren't a problem for the memoized version. The real struggle for dynamic programing is understanding the pieces so you can adequately memoize the problem. But, that's the real struggle of all programming, so nothing new there.

  • @254_Cyrus
    @254_Cyrus Жыл бұрын

    Got yourself a subscriber. I love it. Love the whole explanation and the demos. Thank you SimonDev

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

    Your voice is so relaxing, I feel like I can listen to these tutorials for a whole day

  • @theotherhiveking
    @theotherhiveking2 жыл бұрын

    lmao the wiki page edit

  • @RDaneelOliwav
    @RDaneelOliwav2 жыл бұрын

    Some of your topics are way above me but I love your style! Always a treat to see new uploads!

  • @Skeffles
    @Skeffles2 жыл бұрын

    Great explanation! This was definitely something I just glazed over in the past because it sounded complicated.

  • @john8915
    @john891510 ай бұрын

    This video is solid gold. I've found a neat new tool for working through LeetCode exercises after watching this. For me the 'click' came with seeing the problem break down to two distinct parts. The recursion part for making the problem smaller and the combination part for how to glue the results from the smaller problems back together.

  • @johnswanson217
    @johnswanson2172 жыл бұрын

    You make everything sound less intimidating and fun.

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

    The Easter eggs you put on your videos are really funny to look at, like the fake resume stuff at 1:12 and some other video of yours had a fake game design document too. Yes I'm binging.

  • @PaulFisher

    @PaulFisher

    Жыл бұрын

    this isn’t quite a fake resume, it’s a fake Google “promotion packet” (a thing that you spend days working on in an effort to convince a committee that the work you’ve been doing means you deserve to get recognized with a higher job title and pay. you go over each of your big projects in agonizing detail, justifying it relative to team and company goals and “impact”, and solicit coworkers to effectively be your hype men. so it’s a lot like a resume, but in much more detail, often running to about ten pages of fairly dense text. it was an immensely time-consuming and widely loathed process, and had only a limited effect as compared to your manager’s feedback to the promo committee. I am no longer at Google but I understand that the process has changed significantly (even before the time of layoffs), though I do not know what the changes entail nor the effect that it had. (hello, I was formerly pfish@)

  • @HamzaBenHassen
    @HamzaBenHassen11 ай бұрын

    I love how you end with " hopefully that was helpful" . Man this another tier of quality teaching. thank you !

  • @jeremycoleman827
    @jeremycoleman8272 жыл бұрын

    This channel has my favorite computer graphics content on all of youtube !

  • @playonce4186
    @playonce41866 ай бұрын

    Its basically caching/storing frequently accessed function/calculation outputs, for a bigger function or the same function with different parameters using recursion or iterative approaches or even just basicall function calls to another function.

  • @galelmalah800
    @galelmalah8002 жыл бұрын

    All of your videos are pure gold!

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

    excellent simplification of a complex subject

  • @YuxAsakuras
    @YuxAsakuras2 жыл бұрын

    Man, I love they way you explain! Cheers

  • @Gabriel-wq4ln
    @Gabriel-wq4ln11 ай бұрын

    Not only excellent content, but your voice makes everything better lol

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

    That subtle family friendly Scarface reference got a good chuckle out of me. Subscribed.

  • @herzogsbuick
    @herzogsbuick3 ай бұрын

    "those aren't nails and broken glass, those are prizes!"

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

    There was a cool online lecture by MIT with that super hot professor that used dynamic programming to figure out optimal fingering patterns for playing a guitar song and it was amazing :D

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

    8:30 I used to work at a major tourist destination in southern California. One time when I gave a Canadian kid a US $1 coin as part of his change, he was quite excited to discover that they existed. 😂

  • @simondev758

    @simondev758

    Жыл бұрын

    I didn't know US $1 coins existed either! Learn something new

  • @AlyssaNguyen

    @AlyssaNguyen

    Жыл бұрын

    @@simondev758 I don't know what the current series is, but in the past, the $1 coins have featured Susan B. Anthony, Sacagawea, and US presidents. The kid said something like "I didn't know America had Loonies." If I was more quick-witted, I might've said something like "You might not like [historical figure], but I don't think they were loonie!" 😂

  • @simondev758

    @simondev758

    Жыл бұрын

    @@AlyssaNguyen Hah, have it saved up for the next kid!

  • @BlackJar72
    @BlackJar724 ай бұрын

    I don't see why some people would consider the recursive solutions simpler -- the iterative solution to Fibonacci numbers is literally just how any sane person would solve it with pencil and paper, just automated with a computer, a for loop, and the a couple local variables to cache the last two results.

  • @antonioquintero-felizzola5334
    @antonioquintero-felizzola53342 жыл бұрын

    Great video! As usual.

  • @garbusbeach1493
    @garbusbeach14932 жыл бұрын

    Great video! I'm a huge fam of this channel

  • @neutral_positron
    @neutral_positron3 ай бұрын

    Of course you earned a new subscriber, that is beyond obvious.

  • @damirdesign
    @damirdesign2 жыл бұрын

    Fantastic video and content in general.

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

    Your videos are inspiring to an Unreal developer who wants to have a tutorials channel! It looks so natural, and so well planned at the same time. Thanks a lot! Please, keep it up :D

  • @simondev758

    @simondev758

    Жыл бұрын

    You look like you're well on your way, already at 14k!

  • @RVillani

    @RVillani

    Жыл бұрын

    It's mostly from an old modeling video that got traction because the creators of the character shared it. Very misleading haha

  • @JanDalhuysen
    @JanDalhuysen2 жыл бұрын

    Well done! Excellent video, I love your voice!

  • @vinfern27
    @vinfern272 жыл бұрын

    You are awesome Simon. Would love to pick your brain someday.

  • @m_sharif
    @m_sharif2 жыл бұрын

    It is one of the Best programming tutorials ever.

  • @ilikemorestuff
    @ilikemorestuff2 жыл бұрын

    Oh man that was soo good! Thank you :D

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

    As you have shown, the first step is to find a recursive solution; then you cache the sub-solutions (memoization); then you get rid of the recursion and compute it bottom-up just to flex (dynamic programming.) In my experience as a TA, CS students that struggle to learn dynamic programming actually just struggle to understand recursion, so they can't even get the first step done.

  • @simondev758

    @simondev758

    Жыл бұрын

    Recursion is definitely one of those slightly weird ways of thinking, got any tips on how you help those students out?

  • @dkosmari

    @dkosmari

    Жыл бұрын

    @@simondev758 I encouraged them to change majors.

  • @simondev758

    @simondev758

    Жыл бұрын

    @@dkosmari Hah, harsh

  • @VulpeculaJoy

    @VulpeculaJoy

    Жыл бұрын

    In order to understand recursion, unless there is nothing left to understand, you must fist understand recursion a little bit less.

  • @MSimp2k6

    @MSimp2k6

    Жыл бұрын

    Some things never change -- I started my CS degree over 20 years ago with basic C programming. The pacing was fine, and nobody seemed to struggle. The class thinned out a bit when pointers & recursion were introduced, though. Part of me wonders whether we just suck at teaching it, or whether there's a group of people whose brains just don't work that way. Or both.

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

    Well for file based "memory", one could just hash the problem, pop the state of the solution in a file in a directory with that hash, and then if another problem generates the same hash you can just check all the files in that directory to see if it the solution was already started before, sure a few extra details will be needed to identify if the solution is for the same/similar problem but that's relatively easy to add

  • @Metruzanca
    @Metruzanca2 жыл бұрын

    My goto example for DP has always been calculating n factorial, but like you mentioned its just a different hat.

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

    1:24 "the RAND corporation... vampires, are forcing our parents to go to bed" xD

  • @simondev758

    @simondev758

    Жыл бұрын

    We're through the looking glass here, people

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

    As an IE, my favorite DP algorithm is the Wagner-Whitin algorithm. :)

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

    1:03 Who also saw that picture of SimonDev in the bottom right corner?

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

    Top-notch résumé! 🤣

  • @protowalker
    @protowalker2 жыл бұрын

    "in a way, dynamic programming is just like a morally dubious transaction of sugar-based power"

  • @donaldhobson8873
    @donaldhobson88732 жыл бұрын

    def f(n): if n==0: return 0 a,b=0,1 for i in range(n.bit_length()-1)[::-1]: a,b=a*a+b*b,b*((ai)&1: a,b=b,a+b return b fast fibbonaci function in python. It's asymtotics O(multiplication) ie the speed of calculating a fibonacci number is around the final multiplications speed.

  • @simondev758

    @simondev758

    2 жыл бұрын

    Heh neat, I've never seen that.

  • @donaldhobson8873

    @donaldhobson8873

    2 жыл бұрын

    @@simondev758 Video on fibonacci. kzread.info/dash/bejne/dahr0c6tnceworA.html f(2n)=f(n)**2+f(n-1)**2 f(2n+1)=f(n+1)*(2*f(n)+f(n+1)) Using the binary expression of n, can get f(n) by repeatedly adding 1 and doubling.

  • @AngeloRandazzo
    @AngeloRandazzo2 жыл бұрын

    great ( as usual !)

  • @nielsbom5558
    @nielsbom55582 жыл бұрын

    Thanks! Very cool. How/with what tool do you create your sketchy diagrams?

  • @simondev758

    @simondev758

    2 жыл бұрын

    Chrome canvas

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

    You sound like the Coach McGuirk of Computer Science. I mean, without the laziness and stupidity. I mean it as a compliment, of course. You're great. You make data structures fun. [-ish]

  • @simondev758

    @simondev758

    Жыл бұрын

    Had to look up who that was... and I see it's another H Jon Benjamin character hah

  • @PavelLitkinBorisovich
    @PavelLitkinBorisovich2 жыл бұрын

    best CV ever!

  • @drewcipher896
    @drewcipher8963 ай бұрын

    Oh that's why we spent a week on fibonacci heaps in uni. There *was* a reason! It just took a youtube video 5 years later to understand.

  • @tjalferes
    @tjalferes2 жыл бұрын

    Thank you.

  • @tomg0
    @tomg02 жыл бұрын

    Interesting!

  • @pedro_soares_bhz
    @pedro_soares_bhz11 ай бұрын

    4:11 The clown will always watch us from above. All his blessings fall from the top.

  • @enfieldli9296
    @enfieldli92962 жыл бұрын

    My man, can you make more videos like this? (on javascript)

  • @nomoredarts8918
    @nomoredarts891810 ай бұрын

    In ts/js instead of using plain object as cache, use Map instead. It's much faster when it comes to adding new things

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

    Thanks!

  • @simondev758

    @simondev758

    Жыл бұрын

    Thank you so much!

  • @RVillani

    @RVillani

    Жыл бұрын

    No, thank you!

  • @MrZyman
    @MrZyman2 жыл бұрын

    Brilliant!

  • @ctonellopedro
    @ctonellopedro2 жыл бұрын

    This may be a noob question but is there a reason why you stringfy the key? Why '' + total instead of just total? Great video btw

  • @nullvoidpointer

    @nullvoidpointer

    Жыл бұрын

    If the function takes an array or other object, then it wont work because of how comparison works with object. If two references to the same object are compared, they will be the same, but if 2 objects with identical data are compared, they will be different. For example `{} == {}` is false, but `a = {}; a==a` is true.

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

    1:06 - SimonDev, thought to have discovered common sense. He described it as the ability to just use your goddamn common sense.

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

    Have you made a video applying backtracking to these problems?

  • @simondev758

    @simondev758

    Жыл бұрын

    Don't have one planned right now, really surprised this video suddenly got attention. I think I made it in 2021?

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

    Good video on dynamic programming, but mentioning the Simpsons here seems kind of forced to get some extra attention (and its just for top down/bottom up while dynamic programming is also about memoization).

  • @simondev758

    @simondev758

    Жыл бұрын

    I mention memoization in the video. As for names, yeah, naming is hard. I'm still learning the in's and out's of making a good one. I've been getting some help with them, and this was a part of a change of 4-5 titles. This was a bit of a "try it and see" type of name. It's doing substantially better than the previous, boring title, but could still be much better. You kinda have to try them out, see how they do for a week or 2, whether or not they improve views, and then try to brainstorm another. It's pretty crazy, but just subtle naming changes can bring you from obscure to large numbers of views. You'd think that just making the video was enough, but that's only the beginning.

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

    I thought "dynamic programming" would be generating (and compiling, if it's a compiled language) executable code at run time.

  • @simondev758

    @simondev758

    Жыл бұрын

    That exists too, it's called JIT! (Just In Time) compilation

  • @bluesillybeard

    @bluesillybeard

    Жыл бұрын

    I did that once. I made a function that generates a GLSL shader based on a set of features, for a game "engine" that I've been working on.

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

    one reason modern games are such big downloads, right? 50GB of "assets" does not mean artists crank out crazy big files, they prebake most stuff so you dont have to wait 5min on your first startup of the game

  • @bobchelios9961
    @bobchelios996111 ай бұрын

    i think there is a tangent worth adding most of the time you have to decide to optimize for cpu or memory, this is very much deciding to optimize for cpu and increase memory usage. That might very well be worth the trade, but at times its not

  • @CherPsKy
    @CherPsKy2 жыл бұрын

    I'm web programmer: angular, node, vue, etc... I love your vids but understand very little... 😅 Any advice?

  • @NetherFX

    @NetherFX

    2 жыл бұрын

    pause at any point you dont understand something and look up more information about it, that's what i've been doing with his latest few videos since they go a bit too fast for me

  • @simondev758

    @simondev758

    2 жыл бұрын

    Aw man I didn't realize I was moving too fast :( I like to try to pack as much info in as I can heh As for advice, pretty much just like Ramones mentions. Pause, write down, rewind, repeat until things sink in. Nothing comes easy, at least to me.

  • @nonconsensualopinion

    @nonconsensualopinion

    2 жыл бұрын

    Feynman method. Learn some of it. Write your own lecture notes as if you were going to teach a class on it. Whenever you get stuck or can't explain something, go study that part more. Repeat.

  • @CherPsKy

    @CherPsKy

    2 жыл бұрын

    @@simondev758 It's normal paced for you, but for us mortals 🥺, lucky we can pause and rewind

  • @jeremycoleman827

    @jeremycoleman827

    2 жыл бұрын

    I found a ton of good classes on the channel education 4u , the cg playlist starts with cathode ray tubes and ends at 3d transforms. Also, the cmu database groups youtube is a goldmine for data structures and algorithms . I think learning cg is hard to pin down for external reasons too. Opengl is like a mix of both a program api AND a hardware api . As in, gpu/cpu vendors have to ship their products with an api the os can talk to. that means not everyone wants to support that, hence apple drops support for opengl and we get vulkan from amd. Also, gpu manufacturers want to put in tensor cores for ml but maybe not relevant for cg so they shoehorn some apis. Tldr , i find history of cg important to understand the APIs

  • @3DMage
    @3DMage3 ай бұрын

    At 7:12, you mention that not all of the dynamic programming problems are similar in nature. Do you know any common DP problems that do not fit the common form you talk about?

  • @itsmealec
    @itsmealec4 ай бұрын

    thank you Bob from Bob's burgers

  • @RyanTreadwell
    @RyanTreadwell11 ай бұрын

    Picard and Dathon at El-Adrel

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

    Look what they (imperative style) need to mimic a fraction of out (declarative style) power.

  • @DrakiniteOfficial
    @DrakiniteOfficial11 ай бұрын

    This was an amazing video, but..... What does it have to do with The Simpsons?? Like when did you even mention it in the video?

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

    Hey boss about that paycheck i still havent got it

  • @kanpekiken2481
    @kanpekiken24812 жыл бұрын

    Liking more of these educational programming videos rather than the gaming ones. (Though I do miss the gaming ones lol, I actually made a simple game of my own from everything I learned in your videos )

  • @simondev758

    @simondev758

    2 жыл бұрын

    More gaming ones eventually, people have asked for a few more in this series so I went with it a bit :)

  • @kanpekiken2481

    @kanpekiken2481

    2 жыл бұрын

    @@simondev758 nice. It’ll motivate me to keep going. If you’d like to see what I’ve created due let me know :)

  • @Ni7ram
    @Ni7ram5 ай бұрын

    loved the simpsons references

  • @tmbarral664
    @tmbarral6642 жыл бұрын

    I knew this under another name: Divide & Conquer pattern.

  • @simondev758

    @simondev758

    2 жыл бұрын

    Yeah they're superrrr similar. When you have optimal solutions without overlapping sub-problems, you have divide and conquer.

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

    I work for a FAANG company, I've interviewed candidates… I don't think the questions we've asked fit those patterns though…

  • @simondev758

    @simondev758

    Жыл бұрын

    I've never used a dynamic programming style question, although I have seen a couple colleagues use them. My experience is limited though, I've only been an interviewer at Google, where they had an internal questions site you could grab questions from. And when I was interviewing, that was 12 years ago, I'm sure things have changed quite a lot since then.

  • @psychoh13

    @psychoh13

    Жыл бұрын

    @@simondev758 We have team-wide list of questions here.

  • @CitizensCommunity
    @CitizensCommunity4 ай бұрын

    This was a long way to describe life, and the problem of automation.

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

    you sound like bert from big bang theory

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

    Savage

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

    god I hope you dont have 50 of these comments already but $1 and $2 coins are super common in the US too. We just don't get fun names :(

  • @simondev758

    @simondev758

    Жыл бұрын

    Seriously? I lived in the US for a while and never saw one, so I thought they didn't exist, but I didn't bother to look it up heh

  • @theworld5937
    @theworld59372 жыл бұрын

    I feel like I could more easily convert iron to gold compared to becoming as good as him in coding.

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

    there is a better way to find a fibenacy number and a better sollution for coin change, just saying

  • @atackhelikopter4303

    @atackhelikopter4303

    Жыл бұрын

    subset sum problem can be solved with a queue for O(n) time complexity

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

    Like:dislike ratio on this video is crazy. Unless my browser extension is lying, it's 3K:20, so more than 99% liked.

  • @simondev758

    @simondev758

    Жыл бұрын

    Yeah I'm pretty happy with that, I spend a lot of time planning them and it's good to see people enjoy the work

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

    You sound a lot like Garbaj

  • @sarajin
    @sarajin2 жыл бұрын

    Just use a functional programming language and make your life easier. :D Or at least, in javascript, a functional library like ramda, crocks, sanctuary, etc.

  • @simondev758

    @simondev758

    2 жыл бұрын

    I actually haven't done much functional programming beyond whatever was covered in university. I should go back and try a bit.

  • @sarajin

    @sarajin

    2 жыл бұрын

    @@simondev758 I feel like a lot of what you are discussing here is covered almost by default in functional programming. I'm no expert though. Keep up the awesome videos!

  • @simondev758

    @simondev758

    2 жыл бұрын

    @@sarajin Possibly, I don't know enough about those languages to say one way or the other. Kinda guessing though that if anything, they just may make certain patterns more or less accessible? This is pretty just general problem solving, FAANG type of interview questions, wanted to show that there's actually not a lot here that's scary. I really want to spend some time in some functional languages though, got any recommendations on where to start?

  • @gloverelaxis

    @gloverelaxis

    Жыл бұрын

    yeah I was extremely confused by this video because this is the absolute bread and butter of functional programming. it doesn't even have a name; it's just what programming is. MUCH more importantly, functional programming allows us to recognise the huge structural similarity of all the code solutions that were presented, and lets us write that similarity AS CODE. all those solutions could be represented much more concisely and modularly.

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

    easter eggs

  • @zantaafio
    @zantaafio3 ай бұрын

    Haha that wikipedia page

  • @31redorange08
    @31redorange082 жыл бұрын

    The video glitched somehow. I don't see the dots above your "i"s.

  • @christian-schubert
    @christian-schubert2 жыл бұрын

    Maggie Simpson did

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

    A really horrible name for something that didn't need a name Breaking a problem into small problems and cache the results of the smalls problems is basically common sense and life. I am going to come up with a new term "Multi-Schematic Programming": it's the process of writing a code as lines of text, group those lines in groups named "files" and group those recursively in a top-down tree structure where it's intermediate and root nodes are named "folders". Give me my "Multi-Schematic Programming" wikipedia page.

  • @simondev758

    @simondev758

    Жыл бұрын

    I love it. You're going to make a lot of money selling courses on multi-schematic programming techniques.

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

    Making this video was really just a sub-problem for the larger problem of growing your channel. Now if only we could cache the solution. 🤔

  • @simondev758

    @simondev758

    Жыл бұрын

    Love it

  • @MrHydro-uq1wz
    @MrHydro-uq1wz2 жыл бұрын

    Memowize uwu

Келесі