From a00146c55944c218c28dc1ddde1ca70899202513 Mon Sep 17 00:00:00 2001 From: db <39407623+IcePigZDB@users.noreply.github.com> Date: Mon, 27 Dec 2021 09:27:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Update=20=E4=BA=8C=E5=8F=89=E6=A0=91?= =?UTF-8?q?=E4=B8=AD=E9=80=92=E5=BD=92=E5=B8=A6=E7=9D=80=E5=9B=9E=E6=BA=AF?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" | 1 + 1 file changed, 1 insertion(+) diff --git "a/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" "b/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" index b21c7cfe7b..372a4660ff 100644 --- "a/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" +++ "b/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" @@ -90,6 +90,7 @@ public: 如下为精简之后的递归代码:(257. 二叉树的所有路径) +CPP ``` class Solution { private: From 4545e48a90836b7d3a94d910d9d72e58dcd1c2d9 Mon Sep 17 00:00:00 2001 From: db <39407623+IcePigZDB@users.noreply.github.com> Date: Mon, 27 Dec 2021 09:27:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Update=20=E4=BA=8C=E5=8F=89=E6=A0=91?= =?UTF-8?q?=E4=B8=AD=E9=80=92=E5=BD=92=E5=B8=A6=E7=9D=80=E5=9B=9E=E6=BA=AF?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\222\345\270\246\347\235\200\345\233\236\346\272\257.md" | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git "a/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" "b/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" index 372a4660ff..27ed7a6f1a 100644 --- "a/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" +++ "b/problems/\344\272\214\345\217\211\346\240\221\344\270\255\351\200\222\345\275\222\345\270\246\347\235\200\345\233\236\346\272\257.md" @@ -90,8 +90,7 @@ public: 如下为精简之后的递归代码:(257. 二叉树的所有路径) -CPP -``` +```CPP class Solution { private: void traversal(TreeNode* cur, string path, vector& result) { @@ -132,8 +131,7 @@ traversal(cur->left, path, result); // 左 即: -``` - +``` CPP if (cur->left) { path += "->"; traversal(cur->left, path, result); // 左