![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
二啸
这个作者很懒,什么都没留下…
展开
-
动态规划类问题分类
动态规划类问题分类总结原创 2018-01-02 03:46:54 · 444 阅读 · 0 评论 -
动态规划类问题小结
bottom up 类:转换行进方向如果采用 top down 可能会需要考虑两个corner的情况cur[0] = dp[0] + triangle[i][0] for j in range(1, i): cur[j] = min(dp[j-1], dp[j]) + triangle[i][j] cur[i] = dp[i-1] + triangle[i][i]如果采用bottom up,原创 2018-01-02 09:54:05 · 220 阅读 · 0 评论 -
phone interview 的基本流程
clarification 简单重复题目 input 类型, int float, 正负, none output (一般不必, corner case的话, 可以问问) 想到一些corner case, 问问面试者 think out load 边举例 边讲采用什么算法 想一些corner case (可以问面试者) 用一个例子验证一遍 test 如果有多种情况, 比如没有返回, ret原创 2018-01-26 07:37:28 · 1218 阅读 · 0 评论 -
Leetcode 常见bug总结
647. Substring Anagrams Given a string s and a non-empty string p, find all the start indices of p’s anagrams in s. LintCode 没有验证 len(s) 的情况原创 2018-01-10 00:44:34 · 877 阅读 · 0 评论