urlname
type
Post
password
SyncToConfluence
category
Leetcode
date
Mar 10, 2023 22:23
slug
0206258a59cf
icon
Button
catalog
summary
tags
Algorithm
动态规划
cover
Status
BusyTime
Status 1
status
Published
题目链接
关键词
{% label 动态规划 yellow %}、{% label 字符串 green %}
解析
- 定义
dp[i],表示s[0~i]可以被字典wordDict组成
- 则状态方程:
dp[i] = dp[j] & wordDict.contains(s.substring(j, i))
代码
相似题目
- Author:CoderWdd
- URL:https://www.wuinsights.top//article/0206258a59cf
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts