作品分享
问答交流
发现
任务
客服工单
输入: s = "leetcode", wordDict = ["leet", "code"] 输出: true 表明: 返回 true 由于 "leetcode" 可以由 "leet" 和 "code" 拼接成。
输入: s = "applepenapple", wordDict = ["apple", "pen"] 输出: true 表明: 返回 true 由于 "applepenapple" 可以由 "apple" "pen" "apple" 拼接成。 留意,你可以重复利用字典中的单词。
输入: s = "catsandog", wordDict = ["cats", "dog", "sand", "and", "cat"] 输出: false
举报
本版积分规则 回帖后跳转到最后一页
Powered by CangBaoKu v1.0 小黑屋藏宝库It社区( 冀ICP备14008649号 )
GMT+8, 2025-8-14 16:05, Processed in 0.089766 second(s), 32 queries.© 2003-2025 cbk Team.