8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60a44ba commit 7148d59Copy full SHA for 7148d59
C++/chapBFS.tex
@@ -63,7 +63,7 @@ \subsubsection{代码}
63
64
swap(c, new_word[i]);
65
66
- if (dict.count(new_word) > 0 &&
+ if ((dict.count(new_word) > 0 || new_word == end) &&
67
!visited.count(new_word)) {
68
result.push_back(new_word);
69
visited.insert(new_word);
@@ -171,7 +171,7 @@ \subsubsection{代码}
171
172
173
174
- if ((dict.count(new_word) > 0|| new_word == end) &&
175
176
result.insert(new_word);
177
}
@@ -586,4 +586,4 @@ \subsubsection{只用一个队列的写法}
586
//return 0;
587
588
589
-\end{Codex}
+\end{Codex}
0 commit comments