Skip to content

Commit c4f6258

Browse files
committed
Merge pull request soulmachine#9 from alancs23/master
fix a wrong variable
2 parents 94089f5 + 00bdccb commit c4f6258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/chapDynamicProgramming.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ \subsubsection{代码}
11741174
vector<string> wordBreak(string s, unordered_set<string> &dict) {
11751175
// 长度为n的字符串有n+1个隔板
11761176
vector<bool> f(s.length() + 1, false);
1177-
// path[i][j]为true,表示s[j, i)是一个合法单词,可以从j处切开
1177+
// prev[i][j]为true,表示s[j, i)是一个合法单词,可以从j处切开
11781178
// 第一行未用
11791179
vector<vector<bool> > prev(s.length() + 1, vector<bool>(s.length()));
11801180
f[0] = true;

0 commit comments

Comments
 (0)