代码随想录算法训练营Day46 | 139.单词拆分,关于多重背包,你该了解这些!背包问题总结篇! | Day 17 & 18 复习
139.单词拆分文章链接|题目链接|视频链接C++解法classSolution{public:boolwordBreak(strings,vector&wordDict){unordered_setwordSet(wordDict.begin(),wordDict.end());vectordp(s.size()+1,false);dp[0]=true;for(inti=1;ibool:word