From bad759b4f8238a578a90a0dc2d71ac23877a4747 Mon Sep 17 00:00:00 2001 From: krahets Date: Sat, 22 Apr 2023 01:38:53 +0800 Subject: [PATCH] Rename the naming of the coding files in backtracking algorithm. Add the typedef to docs. --- ...s.cpp => preorder_traversal_i_compact.cpp} | 4 +- ....cpp => preorder_traversal_ii_compact.cpp} | 4 +- ...cpp => preorder_traversal_iii_compact.cpp} | 4 +- ...pp => preorder_traversal_iii_template.cpp} | 4 +- ...des.cs => preorder_traversal_i_compact.cs} | 6 +- ...hs.cs => preorder_traversal_ii_compact.cs} | 6 +- ...s.cs => preorder_traversal_iii_compact.cs} | 6 +- ....cs => preorder_traversal_iii_template.cs} | 6 +- ...java => preorder_traversal_i_compact.java} | 6 +- ...ava => preorder_traversal_ii_compact.java} | 6 +- ...va => preorder_traversal_iii_compact.java} | 6 +- ...a => preorder_traversal_iii_template.java} | 6 +- ...des.py => preorder_traversal_i_compact.py} | 4 +- ...hs.py => preorder_traversal_ii_compact.py} | 4 +- ...s.py => preorder_traversal_iii_compact.py} | 4 +- ....py => preorder_traversal_iii_template.py} | 4 +- .../backtracking_algorithm.md | 116 +++++++++--------- 17 files changed, 98 insertions(+), 98 deletions(-) rename codes/cpp/chapter_backtracking/{preorder_find_nodes.cpp => preorder_traversal_i_compact.cpp} (91%) rename codes/cpp/chapter_backtracking/{preorder_find_paths.cpp => preorder_traversal_ii_compact.cpp} (92%) rename codes/cpp/chapter_backtracking/{preorder_find_constrained_paths.cpp => preorder_traversal_iii_compact.cpp} (93%) rename codes/cpp/chapter_backtracking/{backtrack_find_constrained_paths.cpp => preorder_traversal_iii_template.cpp} (96%) rename codes/csharp/chapter_backtracking/{preorder_find_nodes.cs => preorder_traversal_i_compact.cs} (88%) rename codes/csharp/chapter_backtracking/{preorder_find_paths.cs => preorder_traversal_ii_compact.cs} (90%) rename codes/csharp/chapter_backtracking/{preorder_find_constrained_paths.cs => preorder_traversal_iii_compact.cs} (91%) rename codes/csharp/chapter_backtracking/{backtrack_find_constrained_paths.cs => preorder_traversal_iii_template.cs} (95%) rename codes/java/chapter_backtracking/{preorder_find_nodes.java => preorder_traversal_i_compact.java} (88%) rename codes/java/chapter_backtracking/{preorder_find_paths.java => preorder_traversal_ii_compact.java} (90%) rename codes/java/chapter_backtracking/{preorder_find_constrained_paths.java => preorder_traversal_iii_compact.java} (91%) rename codes/java/chapter_backtracking/{backtrack_find_constrained_paths.java => preorder_traversal_iii_template.java} (94%) rename codes/python/chapter_backtracking/{preorder_find_nodes.py => preorder_traversal_i_compact.py} (91%) rename codes/python/chapter_backtracking/{preorder_find_paths.py => preorder_traversal_ii_compact.py} (92%) rename codes/python/chapter_backtracking/{preorder_find_constrained_paths.py => preorder_traversal_iii_compact.py} (92%) rename codes/python/chapter_backtracking/{backtrack_find_constrained_paths.py => preorder_traversal_iii_template.py} (95%) diff --git a/codes/cpp/chapter_backtracking/preorder_find_nodes.cpp b/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp similarity index 91% rename from codes/cpp/chapter_backtracking/preorder_find_nodes.cpp rename to codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp index b7efc0b2e..5e8bcaf8c 100644 --- a/codes/cpp/chapter_backtracking/preorder_find_nodes.cpp +++ b/codes/cpp/chapter_backtracking/preorder_traversal_i_compact.cpp @@ -1,5 +1,5 @@ /** - * File: preorder_find_nodes.cpp + * File: preorder_traversal_i_compact.cpp * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -8,7 +8,7 @@ vector res; -/* 前序遍历 */ +/* 前序遍历:例题一 */ static void preOrder(TreeNode *root) { if (root == nullptr) { return; diff --git a/codes/cpp/chapter_backtracking/preorder_find_paths.cpp b/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp similarity index 92% rename from codes/cpp/chapter_backtracking/preorder_find_paths.cpp rename to codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp index 747423209..c3f78f19a 100644 --- a/codes/cpp/chapter_backtracking/preorder_find_paths.cpp +++ b/codes/cpp/chapter_backtracking/preorder_traversal_ii_compact.cpp @@ -1,5 +1,5 @@ /** - * File: preorder_find_paths.cpp + * File: preorder_traversal_ii_compact.cpp * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,7 +9,7 @@ vector path; vector> res; -/* 前序遍历 */ +/* 前序遍历:例题二 */ static void preOrder(TreeNode *root) { if (root == nullptr) { return; diff --git a/codes/cpp/chapter_backtracking/preorder_find_constrained_paths.cpp b/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp similarity index 93% rename from codes/cpp/chapter_backtracking/preorder_find_constrained_paths.cpp rename to codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp index c9970f641..8e5d17332 100644 --- a/codes/cpp/chapter_backtracking/preorder_find_constrained_paths.cpp +++ b/codes/cpp/chapter_backtracking/preorder_traversal_iii_compact.cpp @@ -1,5 +1,5 @@ /** - * File: preorder_find_constrained_paths.cpp + * File: preorder_traversal_iii_compact.cpp * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,7 +9,7 @@ vector path; vector> res; -/* 前序遍历 */ +/* 前序遍历:例题三 */ static void preOrder(TreeNode *root) { // 剪枝 if (root == nullptr || root->val == 3) { diff --git a/codes/cpp/chapter_backtracking/backtrack_find_constrained_paths.cpp b/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp similarity index 96% rename from codes/cpp/chapter_backtracking/backtrack_find_constrained_paths.cpp rename to codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp index 0df833a4b..6372b4a46 100644 --- a/codes/cpp/chapter_backtracking/backtrack_find_constrained_paths.cpp +++ b/codes/cpp/chapter_backtracking/preorder_traversal_iii_template.cpp @@ -1,5 +1,5 @@ /** - * File: backtrack_find_constrained_paths.cpp + * File: preorder_traversal_iii_template.cpp * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -31,7 +31,7 @@ void undoChoice(vector &state, TreeNode *choice) { state.pop_back(); } -/* 回溯算法 */ +/* 回溯算法:例题三 */ void backtrack(vector &state, vector &choices, vector> &res) { // 检查是否为解 if (isSolution(state)) { diff --git a/codes/csharp/chapter_backtracking/preorder_find_nodes.cs b/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs similarity index 88% rename from codes/csharp/chapter_backtracking/preorder_find_nodes.cs rename to codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs index ab9711718..0312051ac 100644 --- a/codes/csharp/chapter_backtracking/preorder_find_nodes.cs +++ b/codes/csharp/chapter_backtracking/preorder_traversal_i_compact.cs @@ -1,5 +1,5 @@ /** - * File: preorder_find_nodes.cs + * File: preorder_traversal_i_compact.cs * Created Time: 2023-04-17 * Author: hpstory (hpstory1024@163.com) */ @@ -10,11 +10,11 @@ using System.IO; namespace hello_algo.chapter_backtracking; -public class preorder_find_nodes +public class preorder_traversal_i_compact { static List res; - /* 前序遍历 */ + /* 前序遍历:例题一 */ static void preOrder(TreeNode root) { if (root == null) diff --git a/codes/csharp/chapter_backtracking/preorder_find_paths.cs b/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs similarity index 90% rename from codes/csharp/chapter_backtracking/preorder_find_paths.cs rename to codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs index bc72c6843..b35cfd5a1 100644 --- a/codes/csharp/chapter_backtracking/preorder_find_paths.cs +++ b/codes/csharp/chapter_backtracking/preorder_traversal_ii_compact.cs @@ -1,5 +1,5 @@ /** - * File: preorder_find_paths.cs + * File: preorder_traversal_ii_compact.cs * Created Time: 2023-04-17 * Author: hpstory (hpstory1024@163.com) */ @@ -9,12 +9,12 @@ using NUnit.Framework; namespace hello_algo.chapter_backtracking; -public class preorder_find_paths +public class preorder_traversal_ii_compact { static List path; static List> res; - /* 前序遍历 */ + /* 前序遍历:例题二 */ static void preOrder(TreeNode root) { if (root == null) diff --git a/codes/csharp/chapter_backtracking/preorder_find_constrained_paths.cs b/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs similarity index 91% rename from codes/csharp/chapter_backtracking/preorder_find_constrained_paths.cs rename to codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs index 0ed13a04a..09df632d6 100644 --- a/codes/csharp/chapter_backtracking/preorder_find_constrained_paths.cs +++ b/codes/csharp/chapter_backtracking/preorder_traversal_iii_compact.cs @@ -1,5 +1,5 @@ /** - * File: preorder_find_constrained_paths.cs + * File: preorder_traversal_iii_compact.cs * Created Time: 2023-04-17 * Author: hpstory (hpstory1024@163.com) */ @@ -9,12 +9,12 @@ using NUnit.Framework; namespace hello_algo.chapter_backtracking; -public class preorder_find_constrained_paths +public class preorder_traversal_iii_compact { static List path; static List> res; - /* 前序遍历 */ + /* 前序遍历:例题三 */ static void preOrder(TreeNode root) { // 剪枝 diff --git a/codes/csharp/chapter_backtracking/backtrack_find_constrained_paths.cs b/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs similarity index 95% rename from codes/csharp/chapter_backtracking/backtrack_find_constrained_paths.cs rename to codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs index 38f64ef01..dd5015e65 100644 --- a/codes/csharp/chapter_backtracking/backtrack_find_constrained_paths.cs +++ b/codes/csharp/chapter_backtracking/preorder_traversal_iii_template.cs @@ -1,5 +1,5 @@ /** - * File: backtrack_find_constrained_paths.cs + * File: preorder_traversal_iii_template.cs * Created Time: 2023-04-17 * Author: hpstory (hpstory1024@163.com) */ @@ -9,7 +9,7 @@ using NUnit.Framework; namespace hello_algo.chapter_backtracking; -public class backtrack_find_constrained_paths +public class preorder_traversal_iii_template { /* 判断当前状态是否为解 */ static bool isSolution(List state) @@ -41,7 +41,7 @@ public class backtrack_find_constrained_paths state.RemoveAt(state.Count - 1); } - /* 回溯算法 */ + /* 回溯算法:例题三 */ static void backtrack(List state, List choices, List> res) { // 检查是否为解 diff --git a/codes/java/chapter_backtracking/preorder_find_nodes.java b/codes/java/chapter_backtracking/preorder_traversal_i_compact.java similarity index 88% rename from codes/java/chapter_backtracking/preorder_find_nodes.java rename to codes/java/chapter_backtracking/preorder_traversal_i_compact.java index 966d1b7e6..38b6ac7e9 100644 --- a/codes/java/chapter_backtracking/preorder_find_nodes.java +++ b/codes/java/chapter_backtracking/preorder_traversal_i_compact.java @@ -1,5 +1,5 @@ /** - * File: preorder_find_nodes.java + * File: preorder_traversal_i_compact.java * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,10 +9,10 @@ package chapter_backtracking; import include.*; import java.util.*; -public class preorder_find_nodes { +public class preorder_traversal_i_compact { static List res; - /* 前序遍历 */ + /* 前序遍历:例题一 */ static void preOrder(TreeNode root) { if (root == null) { return; diff --git a/codes/java/chapter_backtracking/preorder_find_paths.java b/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java similarity index 90% rename from codes/java/chapter_backtracking/preorder_find_paths.java rename to codes/java/chapter_backtracking/preorder_traversal_ii_compact.java index 3131673e5..3622bf696 100644 --- a/codes/java/chapter_backtracking/preorder_find_paths.java +++ b/codes/java/chapter_backtracking/preorder_traversal_ii_compact.java @@ -1,5 +1,5 @@ /** - * File: preorder_find_paths.java + * File: preorder_traversal_ii_compact.java * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,11 +9,11 @@ package chapter_backtracking; import include.*; import java.util.*; -public class preorder_find_paths { +public class preorder_traversal_ii_compact { static List path; static List> res; - /* 前序遍历 */ + /* 前序遍历:例题二 */ static void preOrder(TreeNode root) { if (root == null) { return; diff --git a/codes/java/chapter_backtracking/preorder_find_constrained_paths.java b/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java similarity index 91% rename from codes/java/chapter_backtracking/preorder_find_constrained_paths.java rename to codes/java/chapter_backtracking/preorder_traversal_iii_compact.java index 304d3dbfe..325551520 100644 --- a/codes/java/chapter_backtracking/preorder_find_constrained_paths.java +++ b/codes/java/chapter_backtracking/preorder_traversal_iii_compact.java @@ -1,5 +1,5 @@ /** - * File: preorder_find_constrained_paths.java + * File: preorder_traversal_iii_compact.java * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,11 +9,11 @@ package chapter_backtracking; import include.*; import java.util.*; -public class preorder_find_constrained_paths { +public class preorder_traversal_iii_compact { static List path; static List> res; - /* 前序遍历 */ + /* 前序遍历:例题三 */ static void preOrder(TreeNode root) { // 剪枝 if (root == null || root.val == 3) { diff --git a/codes/java/chapter_backtracking/backtrack_find_constrained_paths.java b/codes/java/chapter_backtracking/preorder_traversal_iii_template.java similarity index 94% rename from codes/java/chapter_backtracking/backtrack_find_constrained_paths.java rename to codes/java/chapter_backtracking/preorder_traversal_iii_template.java index 61e555ada..998050f49 100644 --- a/codes/java/chapter_backtracking/backtrack_find_constrained_paths.java +++ b/codes/java/chapter_backtracking/preorder_traversal_iii_template.java @@ -1,5 +1,5 @@ /** - * File: backtrack_find_constrained_paths.java + * File: preorder_traversal_iii_template.java * Created Time: 2023-04-16 * Author: Krahets (krahets@163.com) */ @@ -9,7 +9,7 @@ package chapter_backtracking; import include.*; import java.util.*; -public class backtrack_find_constrained_paths { +public class preorder_traversal_iii_template { /* 判断当前状态是否为解 */ static boolean isSolution(List state) { return !state.isEmpty() && state.get(state.size() - 1).val == 7; @@ -35,7 +35,7 @@ public class backtrack_find_constrained_paths { state.remove(state.size() - 1); } - /* 回溯算法 */ + /* 回溯算法:例题三 */ static void backtrack(List state, List choices, List> res) { // 检查是否为解 if (isSolution(state)) { diff --git a/codes/python/chapter_backtracking/preorder_find_nodes.py b/codes/python/chapter_backtracking/preorder_traversal_i_compact.py similarity index 91% rename from codes/python/chapter_backtracking/preorder_find_nodes.py rename to codes/python/chapter_backtracking/preorder_traversal_i_compact.py index ad32a73c2..09df30a40 100644 --- a/codes/python/chapter_backtracking/preorder_find_nodes.py +++ b/codes/python/chapter_backtracking/preorder_traversal_i_compact.py @@ -1,5 +1,5 @@ """ -File: preorder_find_nodes.py +File: find_nodes-preorder.py Created Time: 2023-04-15 Author: Krahets (krahets@163.com) """ @@ -11,7 +11,7 @@ from modules import * def pre_order(root: TreeNode) -> None: - """前序遍历""" + """前序遍历:例题一""" if root is None: return if root.val == 7: diff --git a/codes/python/chapter_backtracking/preorder_find_paths.py b/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py similarity index 92% rename from codes/python/chapter_backtracking/preorder_find_paths.py rename to codes/python/chapter_backtracking/preorder_traversal_ii_compact.py index 59ca81663..72e058b42 100644 --- a/codes/python/chapter_backtracking/preorder_find_paths.py +++ b/codes/python/chapter_backtracking/preorder_traversal_ii_compact.py @@ -1,5 +1,5 @@ """ -File: preorder_find_paths.py +File: find_paths-preorder.py Created Time: 2023-04-15 Author: Krahets (krahets@163.com) """ @@ -11,7 +11,7 @@ from modules import * def pre_order(root: TreeNode) -> None: - """前序遍历""" + """前序遍历:例题二""" if root is None: return # 尝试 diff --git a/codes/python/chapter_backtracking/preorder_find_constrained_paths.py b/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py similarity index 92% rename from codes/python/chapter_backtracking/preorder_find_constrained_paths.py rename to codes/python/chapter_backtracking/preorder_traversal_iii_compact.py index e0670e2e7..6a796cb21 100644 --- a/codes/python/chapter_backtracking/preorder_find_constrained_paths.py +++ b/codes/python/chapter_backtracking/preorder_traversal_iii_compact.py @@ -1,5 +1,5 @@ """ -File: preorder_find_constrained_path.py +File: find_constrained_paths_template.py Created Time: 2023-04-15 Author: Krahets (krahets@163.com) """ @@ -11,7 +11,7 @@ from modules import * def pre_order(root: TreeNode) -> None: - """前序遍历""" + """前序遍历:例题三""" # 剪枝 if root is None or root.val == 3: return diff --git a/codes/python/chapter_backtracking/backtrack_find_constrained_paths.py b/codes/python/chapter_backtracking/preorder_traversal_iii_template.py similarity index 95% rename from codes/python/chapter_backtracking/backtrack_find_constrained_paths.py rename to codes/python/chapter_backtracking/preorder_traversal_iii_template.py index 300128a1c..fd3a39e42 100644 --- a/codes/python/chapter_backtracking/backtrack_find_constrained_paths.py +++ b/codes/python/chapter_backtracking/preorder_traversal_iii_template.py @@ -1,5 +1,5 @@ """ -File: backtrack_find_constrained_path.py +File: find_constrained_paths_template.py Created Time: 2023-04-15 Author: Krahets (krahets@163.com) """ @@ -36,7 +36,7 @@ def undo_choice(state: list[TreeNode], choice: TreeNode): def backtrack(state: list[TreeNode], choices: list[TreeNode], res: list[list[TreeNode]]): - """回溯算法""" + """回溯算法:例题三""" # 检查是否为解 if is_solution(state): # 记录解 diff --git a/docs/chapter_backtracking/backtracking_algorithm.md b/docs/chapter_backtracking/backtracking_algorithm.md index 83e7a66fa..0eb0711e1 100644 --- a/docs/chapter_backtracking/backtracking_algorithm.md +++ b/docs/chapter_backtracking/backtracking_algorithm.md @@ -10,61 +10,61 @@ === "Java" - ```java title="preorder_find_nodes.java" - [class]{preorder_find_nodes}-[func]{preOrder} + ```java title="preorder_traversal_i_compact.java" + [class]{preorder_traversal_i_compact}-[func]{preOrder} ``` === "C++" - ```cpp title="preorder_find_nodes.cpp" + ```cpp title="preorder_traversal_i_compact.cpp" [class]{}-[func]{preOrder} ``` === "Python" - ```python title="preorder_find_nodes.py" + ```python title="preorder_traversal_i_compact.py" [class]{}-[func]{pre_order} ``` === "Go" - ```go title="preorder_find_nodes.go" + ```go title="preorder_traversal_i_compact.go" [class]{}-[func]{preOrder} ``` === "JavaScript" - ```javascript title="preorder_find_nodes.js" + ```javascript title="preorder_traversal_i_compact.js" [class]{}-[func]{preOrder} ``` === "TypeScript" - ```typescript title="preorder_find_nodes.ts" + ```typescript title="preorder_traversal_i_compact.ts" [class]{}-[func]{preOrder} ``` === "C" - ```c title="preorder_find_nodes.c" + ```c title="preorder_traversal_i_compact.c" [class]{}-[func]{preOrder} ``` === "C#" - ```csharp title="preorder_find_nodes.cs" - [class]{preorder_find_nodes}-[func]{preOrder} + ```csharp title="preorder_traversal_i_compact.cs" + [class]{preorder_traversal_i_compact}-[func]{preOrder} ``` === "Swift" - ```swift title="preorder_find_nodes.swift" + ```swift title="preorder_traversal_i_compact.swift" [class]{}-[func]{preOrder} ``` === "Zig" - ```zig title="preorder_find_nodes.zig" + ```zig title="preorder_traversal_i_compact.zig" [class]{}-[func]{preOrder} ``` @@ -84,61 +84,61 @@ === "Java" - ```java title="preorder_find_paths.java" - [class]{preorder_find_paths}-[func]{preOrder} + ```java title="preorder_traversal_ii_compact.java" + [class]{preorder_traversal_ii_compact}-[func]{preOrder} ``` === "C++" - ```cpp title="preorder_find_paths.cpp" + ```cpp title="preorder_traversal_ii_compact.cpp" [class]{}-[func]{preOrder} ``` === "Python" - ```python title="preorder_find_paths.py" + ```python title="preorder_traversal_ii_compact.py" [class]{}-[func]{pre_order} ``` === "Go" - ```go title="preorder_find_paths.go" + ```go title="preorder_traversal_ii_compact.go" [class]{}-[func]{preOrder} ``` === "JavaScript" - ```javascript title="preorder_find_paths.js" + ```javascript title="preorder_traversal_ii_compact.js" [class]{}-[func]{preOrder} ``` === "TypeScript" - ```typescript title="preorder_find_paths.ts" + ```typescript title="preorder_traversal_ii_compact.ts" [class]{}-[func]{preOrder} ``` === "C" - ```c title="preorder_find_paths.c" + ```c title="preorder_traversal_ii_compact.c" [class]{}-[func]{preOrder} ``` === "C#" - ```csharp title="preorder_find_paths.cs" - [class]{preorder_find_paths}-[func]{preOrder} + ```csharp title="preorder_traversal_ii_compact.cs" + [class]{preorder_traversal_ii_compact}-[func]{preOrder} ``` === "Swift" - ```swift title="preorder_find_paths.swift" + ```swift title="preorder_traversal_ii_compact.swift" [class]{}-[func]{preOrder} ``` === "Zig" - ```zig title="preorder_find_paths.zig" + ```zig title="preorder_traversal_ii_compact.zig" [class]{}-[func]{preOrder} ``` @@ -187,61 +187,61 @@ === "Java" - ```java title="preorder_find_constrained_paths.java" - [class]{preorder_find_constrained_paths}-[func]{preOrder} + ```java title="preorder_traversal_iii_compact.java" + [class]{preorder_traversal_iii_compact}-[func]{preOrder} ``` === "C++" - ```cpp title="preorder_find_constrained_paths.cpp" + ```cpp title="preorder_traversal_iii_compact.cpp" [class]{}-[func]{preOrder} ``` === "Python" - ```python title="preorder_find_constrained_paths.py" + ```python title="preorder_traversal_iii_compact.py" [class]{}-[func]{pre_order} ``` === "Go" - ```go title="preorder_find_constrained_paths.go" + ```go title="preorder_traversal_iii_compact.go" [class]{}-[func]{preOrder} ``` === "JavaScript" - ```javascript title="preorder_find_constrained_paths.js" + ```javascript title="preorder_traversal_iii_compact.js" [class]{}-[func]{preOrder} ``` === "TypeScript" - ```typescript title="preorder_find_constrained_paths.ts" + ```typescript title="preorder_traversal_iii_compact.ts" [class]{}-[func]{preOrder} ``` === "C" - ```c title="preorder_find_constrained_paths.c" + ```c title="preorder_traversal_iii_compact.c" [class]{}-[func]{preOrder} ``` === "C#" - ```csharp title="preorder_find_constrained_paths.cs" - [class]{preorder_find_constrained_paths}-[func]{preOrder} + ```csharp title="preorder_traversal_iii_compact.cs" + [class]{preorder_traversal_iii_compact}-[func]{preOrder} ``` === "Swift" - ```swift title="preorder_find_constrained_paths.swift" + ```swift title="preorder_traversal_iii_compact.swift" [class]{}-[func]{preOrder} ``` === "Zig" - ```zig title="preorder_find_constrained_paths.zig" + ```zig title="preorder_traversal_iii_compact.zig" [class]{}-[func]{preOrder} ``` @@ -295,23 +295,23 @@ def backtrack(state, choices, res): === "Java" - ```java title="backtrack_find_constrained_paths.java" - [class]{backtrack_find_constrained_paths}-[func]{isSolution} + ```java title="preorder_traversal_iii_template.java" + [class]{preorder_traversal_iii_template}-[func]{isSolution} - [class]{backtrack_find_constrained_paths}-[func]{recordSolution} + [class]{preorder_traversal_iii_template}-[func]{recordSolution} - [class]{backtrack_find_constrained_paths}-[func]{isValid} + [class]{preorder_traversal_iii_template}-[func]{isValid} - [class]{backtrack_find_constrained_paths}-[func]{makeChoice} + [class]{preorder_traversal_iii_template}-[func]{makeChoice} - [class]{backtrack_find_constrained_paths}-[func]{undoChoice} + [class]{preorder_traversal_iii_template}-[func]{undoChoice} - [class]{backtrack_find_constrained_paths}-[func]{backtrack} + [class]{preorder_traversal_iii_template}-[func]{backtrack} ``` === "C++" - ```cpp title="backtrack_find_constrained_paths.cpp" + ```cpp title="preorder_traversal_iii_template.cpp" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -327,7 +327,7 @@ def backtrack(state, choices, res): === "Python" - ```python title="backtrack_find_constrained_paths.py" + ```python title="preorder_traversal_iii_template.py" [class]{}-[func]{is_solution} [class]{}-[func]{record_solution} @@ -343,7 +343,7 @@ def backtrack(state, choices, res): === "Go" - ```go title="backtrack_find_constrained_paths.go" + ```go title="preorder_traversal_iii_template.go" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -359,7 +359,7 @@ def backtrack(state, choices, res): === "JavaScript" - ```javascript title="backtrack_find_constrained_paths.js" + ```javascript title="preorder_traversal_iii_template.js" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -375,7 +375,7 @@ def backtrack(state, choices, res): === "TypeScript" - ```typescript title="backtrack_find_constrained_paths.ts" + ```typescript title="preorder_traversal_iii_template.ts" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -391,7 +391,7 @@ def backtrack(state, choices, res): === "C" - ```c title="backtrack_find_constrained_paths.c" + ```c title="preorder_traversal_iii_template.c" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -407,23 +407,23 @@ def backtrack(state, choices, res): === "C#" - ```csharp title="backtrack_find_constrained_paths.cs" - [class]{backtrack_find_constrained_paths}-[func]{isSolution} + ```csharp title="preorder_traversal_iii_template.cs" + [class]{preorder_traversal_iii_template}-[func]{isSolution} - [class]{backtrack_find_constrained_paths}-[func]{recordSolution} + [class]{preorder_traversal_iii_template}-[func]{recordSolution} - [class]{backtrack_find_constrained_paths}-[func]{isValid} + [class]{preorder_traversal_iii_template}-[func]{isValid} - [class]{backtrack_find_constrained_paths}-[func]{makeChoice} + [class]{preorder_traversal_iii_template}-[func]{makeChoice} - [class]{backtrack_find_constrained_paths}-[func]{undoChoice} + [class]{preorder_traversal_iii_template}-[func]{undoChoice} - [class]{backtrack_find_constrained_paths}-[func]{backtrack} + [class]{preorder_traversal_iii_template}-[func]{backtrack} ``` === "Swift" - ```swift title="backtrack_find_constrained_paths.swift" + ```swift title="preorder_traversal_iii_template.swift" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution} @@ -439,7 +439,7 @@ def backtrack(state, choices, res): === "Zig" - ```zig title="backtrack_find_constrained_paths.zig" + ```zig title="preorder_traversal_iii_template.zig" [class]{}-[func]{isSolution} [class]{}-[func]{recordSolution}