Skip to content

Commit

Permalink
fix a wrong variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lamian committed Dec 25, 2013
1 parent ea6d43b commit 00bdccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion C++/chapDynamicProgramming.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ \subsubsection{代码}
vector<string> wordBreak(string s, unordered_set<string> &dict) {
// 长度为n的字符串有n+1个隔板
vector<bool> f(s.length() + 1, false);
// path[i][j]为true,表示s[j, i)是一个合法单词,可以从j处切开
// prev[i][j]为true,表示s[j, i)是一个合法单词,可以从j处切开
// 第一行未用
vector<vector<bool> > prev(s.length() + 1, vector<bool>(s.length()));
f[0] = true;
Expand Down

0 comments on commit 00bdccb

Please sign in to comment.