Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 452 Bytes

Dynamic_Programming.org

File metadata and controls

17 lines (12 loc) · 452 Bytes

Dynamic Programming

  • Solve and memoize subproblems first

    Longest Increasing Subsequence

  • Visualize
  • Find appropriate subproblems (ex. the LIS starting at each element)
  • Find dependencies in subproblems. Which subproblems does LIS(4) depend on?

    LIS(4) = max(LIS(0), LIS(1), LIS(2), …)

  • Recurse and memoize, or build memo table bottom-up