I finally restart to learn dynamic programming

Dynamic programming: mainly guessing + recursion + memorization

if we memory all the fibonacci we dont need to recount the other side of fibonacci tree time = subproblems * time/subproblems

5 easy steps to DP:

  1. define subproblems
  2. guess
  3. relate subproblem solutions
  4. recurse & memorize or build DP table bottom-up
  5. solve the original problem

Topological order??? for fibonacci, we have to computer from small to n, reverse just not working for the time: just time * subproblem

Text justification and blackJack

will do some leetcode for this