摘要:
这是一题不太明显的动态规划,主要考察的应该是深度优先搜索。 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 阅读全文