12 2018 档案
摘要:这是一题不太明显的动态规划,主要考察的应该是深度优先搜索。 if (set.contains(str)) { list.add(str); dfs(s.substring(i, s.length()), set); list.pollLast(); } if (set.contains(str))
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/word-break/ 参考链接:https://blog.csdn.net/c_flybird/article/details/80703494 http://www.cnblogs.com/springfor/p/387
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/palindrome-partitioning-ii/description/ 参考链接:https://blog.csdn.net/jingsuwen1/article/details/51934277 dp[i]存放[0
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/distinct-subsequences/description/ 参考链接:https://www.cnblogs.com/springfor/p/3896152.html http://blog.csdn.net/ab
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/interleaving-string/description/ 参考链接:https://blog.csdn.net/u011095253/article/details/9248073 https://www.cnblo
阅读全文
摘要:题目链接:https://leetcode-cn.com/problems/decode-ways/description/ 参考:https://www.jianshu.com/p/5a604070cd11 题目大意:将一串数字,编码成A-Z的字符串。因为12-->L,或者12-->AB。所有12
阅读全文
摘要:c++的vector使用方法 参考文章:http://www.runoob.com/w3cnote/cpp-vector-container-analysis.html vector是一个动态数组。 1.构造函数 vector():创建一个空vector vector(int nSize):创建一个
阅读全文