最近二周上班工作太忙, 下班打网球; 前一阵下班做题, 比较有挫折感, 体重上升; 上楼梯吃力. 所以, 上周尝试下班不看代码, 早睡早起. 周六重新开始, 学习写代码.
看几个录像, 由于网速问题, 看了几个. 但是, 觉得非常有帮助.
May 23, 2015
特别喜欢这个讲座, Leetcode question 3 也是与字符串相关的.
Recently, I was too busy at work, and go to play tennis after work; I did not have chance to review Leetcode questions, felt frustrated, and my body weight goes up; difficult to climb stairs from first floor to 3rd floor. So, back to normal, go to bed early and then get up early. Now, it is the time to start to work on, and learn more things about coding.
My favorite video is to talk about string manipulation. 看看自己用中文认真学习算法, 会不会提高自己的自信心. 下面是笔记:
总结: 单词翻转, in-place O(1) space, 原地
本身O(1)空间
递归, 堆栈空间可以不计算
原地相关的问题:
字符川循环左移, 右移动
快排partition相关
滑动窗口
能达到O(n)时间的复杂度
O(1)的空间复杂度
规则相关
匹配(暴力): KMP比较少见
Manacher - 要求比较高的笔试
No comments:
Post a Comment