topic 3: DP

how it works:
  store some of the results by saving them: memoised result

 

 

 

 

1. 338 return a vector of counting bits

    1. declare a vector of size: vector<int> v(n+1);

    2. from bottom to up, find the patten.

2. 509 fib number

  two ways:

    1. bottom up

    2. using recursion, up bottom

 

posted @ 2021-10-04 13:48  John_K  阅读(18)  评论(0编辑  收藏  举报