Update 0112.路径总和.md

修改了一个错字。最近在准备 ACM 省赛,非常感谢作者的题解!
This commit is contained in:
weijiew
2021-05-04 11:41:30 +08:00
committed by GitHub
parent 218c58bd72
commit a75ff6a04f

View File

@ -249,7 +249,7 @@ private:
vector<int> 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;
}