diff --git a/problems/0112.路径总和.md b/problems/0112.路径总和.md index 429bb556..6c303f45 100644 --- a/problems/0112.路径总和.md +++ b/problems/0112.路径总和.md @@ -249,7 +249,7 @@ private: vector path; // 递归函数不需要返回值,因为我们要遍历整个树 void traversal(TreeNode* cur, int count) { - if (!cur->left && !cur->right && count == 0) { // 遇到了叶子节点切找到了和为sum的路径 + if (!cur->left && !cur->right && count == 0) { // 遇到了叶子节点且找到了和为sum的路径 result.push_back(path); return; }