随笔分类 - 刷题进行时
摘要:最长公共子串是字符串匹配中一个常见问题,在此做下总结,感觉解法真的是很巧妙。 如:对于字符串“aabbaadcc”和“baadce”,矩阵中,m[i][j] = 1,表示str1[i]和str2[j]相等 a a b b a a d c c b 0 0 1 1 ...
阅读全文
摘要: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...
阅读全文
摘要:No.22 Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3,...
阅读全文

浙公网安备 33010602011771号