Dynamic Programming - Top Down Memoization & Bottom Up Tabulation - DSA Course in Python Lecture 15

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 19

  • @GregHogg
    @GregHogg  5 месяцев назад +1

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

  • @Memes_Karaa
    @Memes_Karaa День назад

    U know when i seen the idea of how to do it , i literally don't look at your code and begin to apply that idea and literally it worked slight difference in code but logic was same !!
    I literally don't know what is DP but seeing your video it's very beneficial for intermediate coder
    thanks Brother❤❤😁😁

  • @ahmedzz4754
    @ahmedzz4754 5 месяцев назад +3

    I really appreciate your help , you helped me pass the ecpc(egypt's collegiate programming contest) qualification today

    • @GregHogg
      @GregHogg  5 месяцев назад +1

      Really glad to hear it, and huge congrats!

  • @creativeusername4400
    @creativeusername4400 5 месяцев назад +2

    grateful for your consistency!

  • @helloworldcsofficial
    @helloworldcsofficial 4 месяца назад +1

    Great explanation. Thank you!

  • @bigk9000
    @bigk9000 2 месяца назад +1

    Wouldn't the Golden Ratio approach be O(1) time since it isn't iterating through anything?

    • @adityakhambeteIIT
      @adityakhambeteIIT Месяц назад

      raising something to power of n is O(logn) since it uses binary search at the backend

  • @harish-zp8hz
    @harish-zp8hz 5 месяцев назад

    why do we use self.fib instead of fib

    • @jorgetomaylla5032
      @jorgetomaylla5032 4 месяца назад +1

      fib is a function of the Solution class in leetcode, you can tell when the function has a "self" as an argument. The self basically allows for a distinction of this fib function in comparison to another Solution object's fib function. So, you must call self.fib() to indicate that you wish to call this class's fib function. It will also throw an error saying "fib()" not recognized if you do not use self. It's a good safety measure too

    • @harish-zp8hz
      @harish-zp8hz 4 месяца назад

      @@jorgetomaylla5032 tnxx

  • @kumaranb8702
    @kumaranb8702 5 месяцев назад

    Good 😊

  • @DrDeuteron
    @DrDeuteron 5 месяцев назад +1

    What do you think of this:
    def fib(n, _m={0:0, 1:1}):
    try:
    y = _m[n]
    except KeyError:
    y = fib(n-1) + fib(n-2)
    _m[n] = y
    finally:
    return y

    • @AKProductionsTelugu
      @AKProductionsTelugu 5 месяцев назад

      What were you thinking by writing an ugly syntax here 😂

  • @GarouNguyen
    @GarouNguyen 5 месяцев назад +1

    Bro thank for your value bring to the world, but videos about recursion and backtracking I still don't understand ☹️😣😣 can you explain about backtracking in second video for a video just 2 minutes

    • @Ganesh-lm5dx
      @Ganesh-lm5dx 2 месяца назад

      yes same here i could not understand backtracking implementation

  • @user-jm6gp2qc8x
    @user-jm6gp2qc8x 4 месяца назад

    this is actually good lol

  • @bahulyank.t7590
    @bahulyank.t7590 5 месяцев назад

    Hi

  • @yasharth
    @yasharth 19 дней назад