pylist
记忆化搜索
要点
一道题可以用DC的DFS来完成。
搜索的分支有重复所以有可能(基本上)要超时
这时候只要在DC的函数上加上对结果的记忆即可
从DC到Dict记忆到lru_cache请看
这里
Example
109. Triangle
107. Word Break
582. Word Break II
683. Word Break III
192. Wildcard Matching
154. Regular Expression Matching
110. Minimum Path Sum
64. Minimum Path Sum
111. Climbing Stairs
114. Unique Paths
115. Unique Paths II
76. Longest Increasing Subsequence
1143. Longest Common Subsequence
221. Maximal Square
983. Minimum Cost For Tickets