摘要:
problem:https://leetcode.com/problems/delete-columns-to-make-sorted-iii/ 这是一道伪装成2维的1维最长子序列类型的dp题目,虽然打着hard的tag,实际上我觉得还没有另外一道make sorted的贪心类型的题目难。 阅读全文
posted @ 2019-08-07 23:13
fish1996
阅读(202)
评论(0)
推荐(0)
摘要:
problem:https://leetcode.com/problems/unique-paths/ 简单的dp题,类爬台阶题目。 阅读全文
posted @ 2019-08-07 22:49
fish1996
阅读(124)
评论(0)
推荐(0)
摘要:
problem:https://leetcode.com/problems/soup-servings 用的记忆搜索。第一次提交栈溢出了(虽然已经做了记忆)……之后在评论区发现了宝藏优化方法!以及发现自己没有必要返回pair,直接对情况2返回0.5就可以了。 阅读全文
posted @ 2019-08-07 22:32
fish1996
阅读(334)
评论(0)
推荐(0)
摘要:
problem: https://leetcode.com/problems/triangle/ 非常简单直观的dp,注意下标不要搞错就可以了。 阅读全文
posted @ 2019-08-07 21:07
fish1996
阅读(135)
评论(0)
推荐(0)
摘要:
problem:https://leetcode.com/problems/decode-ways 一道比较经典的爬楼梯类型的dp。 阅读全文
posted @ 2019-08-07 16:01
fish1996
阅读(134)
评论(0)
推荐(0)
摘要:
problem:https://leetcode.com/problems/number-of-longest-increasing-subsequence/ 这道题问的是最长的连续子序列的个数。这道题是XX子序列系列,是求最长连续子序列长度的升级版,关于求最长子序列长度,我们可以设定一个数组len 阅读全文
posted @ 2019-08-07 14:10
fish1996
阅读(146)
评论(0)
推荐(0)
摘要:
problem:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ 以下这个答案超了内存限制orz,思路应该没啥问题,感觉要去评论区学一下花式优化技巧了。 补充·,仔细看了一下卡空间复杂度的竟然是因为有个很大的K,但有效 阅读全文
posted @ 2019-08-07 11:39
fish1996
阅读(156)
评论(0)
推荐(0)

浙公网安备 33010602011771号