随笔分类 -  刷题进行时

摘要:最长公共子串是字符串匹配中一个常见问题,在此做下总结,感觉解法真的是很巧妙。 如:对于字符串“aabbaadcc”和“baadce”,矩阵中,m[i][j] = 1,表示str1[i]和str2[j]相等 a a b b a a d c c b 0 0 1 1 ... 阅读全文
posted @ 2015-04-03 14:58 人生不酱油 阅读(342) 评论(0) 推荐(0)
摘要:No.78 SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution se... 阅读全文
posted @ 2015-04-01 19:22 人生不酱油 阅读(136) 评论(0) 推荐(0)
摘要:No.22 Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3,... 阅读全文
posted @ 2015-04-01 16:28 人生不酱油 阅读(259) 评论(0) 推荐(0)