1.Implement strStr()
http://blog.csdn.net/abuiujhjg123456789/article/details/78479728
2.面试中考察内容:
①coding style:变量名命名、缩进、括号
②bug free:异常检测、边界处理
③测试:主动给出testcase,cover掉所有情况
3.排列组合模板(DFS)
例子:
subset全子集问题:看到题目中的all solutions马上想到要用DFS
subset II带重复元素的全子集问题:去重的基本思路是选代表
总结:排列组合模板适用于所有的搜索问题
根据具体题目要求进行改动
·什么时候输出
·哪些情况需要跳过
4.相关题目
77.Combinations
Unique Premutations
39.Combination Sum
40.Combination Sum II
Letter Combination of a Phone Number
131.Palindrome Partitioning
Restore IP Address