Memoization or Tabulation approach for Dynamic programming

前端 未结 3 1311
执笔经年
执笔经年 2020-12-24 02:30

There are many problems that can be solved using Dynamic programming e.g. Longest increasing subsequence. This problem can be solved by using 2 approaches

  1. Memo
3条回答
  •  离开以前
    2020-12-24 02:58

    Asymptotically a dynamic programming implementation that is top down is the same as going bottom up, assuming you're using the same recurrence relation. However, bottom up is generally more efficient because of the overhead of recursion which is used in memoization.

提交回复
热议问题