代码随想录算法训练营第四十六天|139.单词拆分、动态规划:关于多重背包,你该了解这些、背包问题总结
139.单词拆分139.单词拆分-力扣(LeetCode)classSolution{public:boolwordBreak(strings,vector&wordDict){unordered_setwordSet(wordDict.begin(),wordDict.end());vectordp(s.size()+1,false);dp[0]=true;for(inti=1;i<=s.siz