diff --git a/C++/chapLinearList.tex b/C++/chapLinearList.tex index bbc0ec1c..76d64f01 100644 --- a/C++/chapLinearList.tex +++ b/C++/chapLinearList.tex @@ -501,8 +501,8 @@ \subsubsection{代码} for (int i = 0; i < nums.size(); i++) { const int gap = target - nums[i]; if (mapping.find(gap) != mapping.end() && mapping[gap] > i) { - result.push_back(i + 1); - result.push_back(mapping[gap] + 1); + result.push_back(i); + result.push_back(mapping[gap]); break; } } diff --git a/C++/chapTree.tex b/C++/chapTree.tex index 7e70c7b5..a7fc6cd1 100644 --- a/C++/chapTree.tex +++ b/C++/chapTree.tex @@ -1468,7 +1468,7 @@ \subsubsection{代码} \subsubsection{相关题目} \begindot -\item Validate Binary Search Tree,见 \S \ref{sec:validate-binary-search-tree} +\item Binary Tree Inorder Traversal,见 \S \ref{sec:binary-tree-inorder-traversal} \myenddot diff --git a/C++/leetcode-cpp.pdf b/C++/leetcode-cpp.pdf index 72d3da55..9c7e3155 100644 Binary files a/C++/leetcode-cpp.pdf and b/C++/leetcode-cpp.pdf differ