题目:

题解:
public class Solution {
    public boolean wordBreak(String s, List<String> wordDict) {
        Set<String> wordDictSet = new HashSet(wordDict);
        boolean[] dp = new boolean[s.length() + 1];
        dp[0] = true;
        for (int i = 1; i <= s.length(); i++) {
            for (int j = 0; j < i; j++) {
                if (dp[j] && wordDictSet.contains(s.substring(j, i))) {
                    dp[i] = true;
                    break;
                }
            }
        }
        return dp[s.length()];
    }
}![[Vue3:axios]:实现实现登陆页面前后端请求,并用Vite解决跨域问题](https://img-blog.csdnimg.cn/direct/3a8ce1fbf345438aafe0060c48a79751.png)


















![[FSCTF 2023]Tea_apk](https://img-blog.csdnimg.cn/img_convert/da6f7905560203ed885bc4bc9166a278.png)