Memoization Technique in Dynamic Programming (DP)

Sdílet
Vložit
  • čas přidán 5. 05. 2024
  • FAANG Coding Interviews / Data Structures and Algorithms / Leetcode

Komentáře • 29

  • @GregHogg
    @GregHogg  Před 2 měsíci +4

    Master Data Structures & Algorithms For FREE at AlgoMap.io!

  • @ItsGBMoD
    @ItsGBMoD Před 2 měsíci +22

    i love dp, im going to recommend it to my girlfriend

    • @GregHogg
      @GregHogg  Před 2 měsíci +11

      That's a great idea, I bet she thinks about memoization a lot

    • @scuderia6272
      @scuderia6272 Před 2 měsíci +2

      💀

  • @daviddong9916
    @daviddong9916 Před 2 měsíci +3

    I watch you when I wake up and before bed. I watch you in gym and even in the bathroom. You already made me addicted to you ❤

    • @GregHogg
      @GregHogg  Před 2 měsíci +2

      Hahaha. So sweet. Slightly creepy sounding, but mostly sweet haha

    • @daviddong9916
      @daviddong9916 Před 2 měsíci +1

      @@GregHogg I promise I will be less obsessed with you after I get multiple offers 😉

    • @dionvarghese6489
      @dionvarghese6489 Před 2 měsíci

      @@GregHogg looks like he wants to get dp’ed

  • @scuderia6272
    @scuderia6272 Před 2 měsíci +11

    Now I know why TikTok is getting banned lol

    • @attenonmj3708
      @attenonmj3708 Před dnem +1

      Why?

    • @scuderia6272
      @scuderia6272 Před dnem

      ​@attenonmj3708 bro updated the video, it had a tiktok video Snippet of a baddie

  • @maitri1656
    @maitri1656 Před 2 měsíci +4

    Bro 😂 i thought it was fr
    But thanks for this

  • @Joshjson
    @Joshjson Před 2 měsíci +2

    DP more like Downbad Parasocial

  • @ShardulPrabhu
    @ShardulPrabhu Před 2 měsíci +1

    Use lrucache

  • @littleapple5786
    @littleapple5786 Před 2 měsíci +1

  • @ammarammar-to8jv
    @ammarammar-to8jv Před dnem

    can use some like this?
    if n mod 2 =0
    return n/2
    else
    ( int n/2) +1

  • @pedramghasemi1417
    @pedramghasemi1417 Před 11 hodinami

    How to master dp ?

  • @sammohanty5507
    @sammohanty5507 Před 22 hodinami

    I am just starting with data structures and algo.
    So cant understand the comments. This is a real solution for this problem ryt?

  • @PostMeridianLyf
    @PostMeridianLyf Před 2 měsíci

    fugging LOOOOOL

  • @robinjha7121
    @robinjha7121 Před dnem

    if n==1:
    return 1
    prev=1
    curr=2
    for i in range(3, n+1):
    temp=curr
    curr=prev+temp
    prev=temp
    return curr

  • @ohcrap2222
    @ohcrap2222 Před 2 měsíci

    A recursive solution but I think it's less efficient.

    • @GregHogg
      @GregHogg  Před 2 měsíci +1

      Slightly, but time complexity it's still O(n)

  • @shapelessed
    @shapelessed Před dnem

    These are the kinds of worthless issues they task you with for a frontend sev position. Amazing, isn't it?