Комментарии:
What is the purpose of your if test for memo[n]. You left out the == 0 .Don’t you only want to compute it if it’s not cached and return the one you have cached.
ОтветитьIs this how you play minesweeper?
ОтветитьGarbage explaining for someone who’s never seen this before.
ОтветитьATTENTION! Her code is WRONG. HERE is what correct memoization looks like.
function fibonacci(n, memo)
if memo[n] is not None
return memo[n]
if n <= 1
f = 1
else
f = fibonacci(n-1, memo) + fibonacci(n-2, memo)
memo[n] = f
return f
Amazing, very good explanation, makes me understand the concept of memoization, thanks!
Ответитьhow is the sapce compelxity for recurive fibonnaci O(N) !??!?!
Ответитьcan anyone show me the working code of the path counting porblem using DP?
ОтветитьI like the "traditional" approach at 10 mins.
That is actually quite interesting and never thought about that
In the Fibonacci example why do you do “if else memo[n]” rather than “if else !(memo[n])”? Aren’t you checking if there is a value and if there isn’t (ie it is NULL) then calculate it?
ОтветитьThanks! Very clear explanation.
Ответитьhow can Memoization help if your input is > 1000 ...
ОтветитьAwesome video in illustrating difficult concepts
ОтветитьThanks for this video.
ОтветитьWhat do the words associative arrays , lookup table,cache hit/miss ratio have in common with memoization?
ОтветитьGreat explanation. Thank you!
ОтветитьThanks for the interesting video. Very concise and clear explanation of dynamic programming concept.
ОтветитьBest videos eveeerrr!! Matrix problems I just use i and j.
ОтветитьForgotten to write:
if (row > max || col > max) return 0;
otherwise row and col keep increasing and will buffer overflow
Point to be noted- We will never reach sqaures with 7,4,1,1 in first column, as we can only go right but not left.
ОтветитьWouldn't this break if there were enough blocks requiring the path to go up or left?
ОтветитьAmazing explanation!
ОтветитьI once stumbled onto the misconseption you mentioned when using y as rows and x as columns and now I just figured it out why it happened then 😅. When we use the grid representation it would be good to indicate that arrows pointing the directions mean that its the way where row numbers are increasing and not neccessarily the way that rows are aligned I’m kind of dumb but if anyone else had this problem that might be the answer
ОтветитьI deadass thought you just pronounced 'memorization' incorrectly and was very confused for a sec.
ОтветитьYou are such an amazing teacher!!
ОтветитьThis is so good! She concises my 2.5 hrs lecture into 11 mins.
ОтветитьHonestly you cant learn dynamic programming
ОтветитьНормально перевели, "карьера программиста"...
ОтветитьUsing the explicit formula for fibonacci numbers, you can implement it in O(log n) time.
ОтветитьSo what was the last part going from bottom-up about? Is it just running the example or showing us a different way to do code it?
ОтветитьBest as always, Gayle Laakmann.
Ответитьkap'epa npogpammucta
Ответитьspace complexity of recursive solution for fibonacci series very well explained.
ОтветитьGood explanation of memoization !!!
ОтветитьWould have been nice to see the explanation of adding in the memo array
ОтветитьThank you for making it so easy to understand !
ОтветитьThank you so much, you really enlightened my way!
ОтветитьGrt online teacher
ОтветитьThis video is extremely well done!
ОтветитьCan the memo array be initialised with 0 and 1 and then the 2 ifs be removed?
ОтветитьI know she is famous for her book, but she should not be doing these videos if she’s just going to phone it in. Get someone who can present clearly instead.
ОтветитьOk nanti aku cari di google ya, makasi ya lucifer ,
ОтветитьGak keliaaataaannnn bapaaakkk 🤣
ОтветитьGak keliatan ... ketutupan translate ...
Benerin 🤣ayok cepet !
Dp = sub problems
Ответить