LeetCode day13

摘要: 34. Search for a Range两遍binary search, 找到开始的Index和结束的Index36. Set Matrix ZerosO(m+n) is easy 阅读全文
posted @ 2014-11-01 00:37 SuperBo 阅读(83) 评论(0) 推荐(0) 编辑

LeetCode day12

摘要: 32. Subsetw wx -- wxy -- wxyz -- wxz wy -- wyz wzxyz33. Longest Common Prefixeasy34. Search for a Range 阅读全文
posted @ 2014-10-31 07:20 SuperBo 阅读(62) 评论(0) 推荐(0) 编辑

LeetCode day11

摘要: 28. Length of Last Word' ' = char white space, " " = string需要考虑各种情况 ‘a ’, ' ', ' a'29. Search Rotated Sorted Array需要考虑各种情况30.Search Rotated Sor... 阅读全文
posted @ 2014-10-30 05:10 SuperBo 阅读(104) 评论(0) 推荐(0) 编辑

LeetCode day10 Called it

摘要: 26. Sum Root to leaf Number27. Minimum Depth of Binary Tree.递归解法急速判断左右两边子树哪个depth最小,要注意如果有个节点只有一边孩子时,不能返回0,要返回另外一半边的depth。 阅读全文
posted @ 2014-10-29 11:15 SuperBo 阅读(73) 评论(0) 推荐(0) 编辑