8000 Merge pull request #31 from liuluheng/master · lockys/leetcode@1b92081 · GitHub
[go: up one dir, main page]

Skip to content
Sign in

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1b92081

Browse files
committed
Merge pull request soulmachine#31 from liuluheng/master
fixbug in chapBFS.tex section 1
2 parents 09a93c9 + fa27e11 commit 1b92081

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

C++/chapBFS.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ \subsubsection{代码}
6363

6464
swap(c, new_word[i]);
6565

66-
if (dict.count(new_word) > 0 &&
66+
if ((dict.count(new_word) > 0 || new_word == end) &&
6767
!visited.count(new_word)) {
6868
result.push_back(new_word);
6969
visited.insert(new_word);
@@ -171,7 +171,7 @@ \subsubsection{代码}
171171

172172
swap(c, new_word[i]);
173173

174-
if ((dict.count(new_word) > 0|| new_word == end) &&
174+
if ((dict.count(new_word) > 0 || new_word == end) &&
175175
!visited.count(new_word)) {
176176
result.insert(new_word);
177177
}
@@ -586,4 +586,4 @@ \subsubsection{只用一个队列的写法}
586586
//return 0;
587587
}
588588
}
589-
\end{Codex}
589+
\end{Codex}

C++/chapDivideAndConquer.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ \subsubsection{分析}
5757

5858
\subsubsection{代码}
5959
\begin{Code}
60-
// LeetCode, Longest Substring Without Repeating Characters
60+
// LeetCode, Sqrt(x)
6161
// 二分查找
6262
// 时间复杂度O(logn),空间复杂度O(1)
6363
class Solution {

0 commit comments

Comments
 (0)
0