摘要:
http://oj.leetcode.com/problems/word-break/动态规划题目,重点是建立出模型来:fun(start,end) = fun(start,i)*fun(i+1,end);二维动态数组的申请: int len = s.length(); int **flag = new int *[len]; for(int i = 0;i#include #include using namespace std;class Solution {public: bool fun(string s,unordered_set &dict,int start,int e.
阅读全文