From 75d54c328a5f30ddad80ecd7720f9caedb365b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E7=A8=8B=E4=BA=91?= Date: Tue, 8 Dec 2020 19:28:06 +0800 Subject: [PATCH] modify code structrue --- src/class06/Test.java | 5 ----- src/{class06 => class06_09}/Code01_LinkedListMid.java | 2 +- src/{class06 => class06_09}/Code02_IsPalindromeList.java | 2 +- src/{class06 => class06_09}/Code03_SmallerEqualBigger.java | 2 +- src/{class06 => class06_09}/Code04_CopyListWithRandom.java | 2 +- .../Code01_FindFirstIntersectNode.java} | 4 ++-- .../Code02_RecursiveTraversalBT.java} | 4 ++-- .../Code03_UnRecursiveTraversalBT.java} | 4 ++-- .../Code01_LevelTraversalBT.java} | 4 ++-- .../Code02_SerializeAndReconstructTree.java} | 4 ++-- .../Code03_PrintBinaryTree.java} | 4 ++-- .../Code04_TreeMaxWidth.java} | 4 ++-- .../Code05_SuccessorNode.java} | 4 ++-- .../Code06_PaperFolding.java} | 4 ++-- 14 files changed, 22 insertions(+), 27 deletions(-) delete mode 100644 src/class06/Test.java rename src/{class06 => class06_09}/Code01_LinkedListMid.java (99%) rename src/{class06 => class06_09}/Code02_IsPalindromeList.java (99%) rename src/{class06 => class06_09}/Code03_SmallerEqualBigger.java (99%) rename src/{class06 => class06_09}/Code04_CopyListWithRandom.java (99%) rename src/{class06/Code05_FindFirstIntersectNode.java => class07_10/Code01_FindFirstIntersectNode.java} (98%) rename src/{class07/Code01_RecursiveTraversalBT.java => class07_10/Code02_RecursiveTraversalBT.java} (94%) rename src/{class07/Code02_UnRecursiveTraversalBT.java => class07_10/Code03_UnRecursiveTraversalBT.java} (97%) rename src/{class07/Code03_LevelTraversalBT.java => class07_11/Code01_LevelTraversalBT.java} (93%) rename src/{class07/Code04_SerializeAndReconstructTree.java => class07_11/Code02_SerializeAndReconstructTree.java} (98%) rename src/{class07/Code05_PrintBinaryTree.java => class07_11/Code03_PrintBinaryTree.java} (96%) rename src/{class07/Code06_TreeMaxWidth.java => class07_11/Code04_TreeMaxWidth.java} (97%) rename src/{class07/Code07_SuccessorNode.java => class07_11/Code05_SuccessorNode.java} (97%) rename src/{class07/Code08_PaperFolding.java => class07_11/Code06_PaperFolding.java} (90%) diff --git a/src/class06/Test.java b/src/class06/Test.java deleted file mode 100644 index f833821..0000000 --- a/src/class06/Test.java +++ /dev/null @@ -1,5 +0,0 @@ -package class06; - -public class Test { - -} diff --git a/src/class06/Code01_LinkedListMid.java b/src/class06_09/Code01_LinkedListMid.java similarity index 99% rename from src/class06/Code01_LinkedListMid.java rename to src/class06_09/Code01_LinkedListMid.java index 04cc571..c406ae5 100644 --- a/src/class06/Code01_LinkedListMid.java +++ b/src/class06_09/Code01_LinkedListMid.java @@ -1,4 +1,4 @@ -package class06; +package class06_09; import java.util.ArrayList; diff --git a/src/class06/Code02_IsPalindromeList.java b/src/class06_09/Code02_IsPalindromeList.java similarity index 99% rename from src/class06/Code02_IsPalindromeList.java rename to src/class06_09/Code02_IsPalindromeList.java index 090409d..75353bd 100644 --- a/src/class06/Code02_IsPalindromeList.java +++ b/src/class06_09/Code02_IsPalindromeList.java @@ -1,4 +1,4 @@ -package class06; +package class06_09; import java.util.Stack; diff --git a/src/class06/Code03_SmallerEqualBigger.java b/src/class06_09/Code03_SmallerEqualBigger.java similarity index 99% rename from src/class06/Code03_SmallerEqualBigger.java rename to src/class06_09/Code03_SmallerEqualBigger.java index a5718ed..6ec2d96 100644 --- a/src/class06/Code03_SmallerEqualBigger.java +++ b/src/class06_09/Code03_SmallerEqualBigger.java @@ -1,4 +1,4 @@ -package class06; +package class06_09; public class Code03_SmallerEqualBigger { diff --git a/src/class06/Code04_CopyListWithRandom.java b/src/class06_09/Code04_CopyListWithRandom.java similarity index 99% rename from src/class06/Code04_CopyListWithRandom.java rename to src/class06_09/Code04_CopyListWithRandom.java index 0a0a836..7ae03d7 100644 --- a/src/class06/Code04_CopyListWithRandom.java +++ b/src/class06_09/Code04_CopyListWithRandom.java @@ -1,4 +1,4 @@ -package class06; +package class06_09; import java.util.HashMap; diff --git a/src/class06/Code05_FindFirstIntersectNode.java b/src/class07_10/Code01_FindFirstIntersectNode.java similarity index 98% rename from src/class06/Code05_FindFirstIntersectNode.java rename to src/class07_10/Code01_FindFirstIntersectNode.java index bc27bbb..9ee0227 100644 --- a/src/class06/Code05_FindFirstIntersectNode.java +++ b/src/class07_10/Code01_FindFirstIntersectNode.java @@ -1,6 +1,6 @@ -package class06; +package class07_10; -public class Code05_FindFirstIntersectNode { +public class Code01_FindFirstIntersectNode { public static class Node { public int value; diff --git a/src/class07/Code01_RecursiveTraversalBT.java b/src/class07_10/Code02_RecursiveTraversalBT.java similarity index 94% rename from src/class07/Code01_RecursiveTraversalBT.java rename to src/class07_10/Code02_RecursiveTraversalBT.java index 56e9bec..ed73cc1 100644 --- a/src/class07/Code01_RecursiveTraversalBT.java +++ b/src/class07_10/Code02_RecursiveTraversalBT.java @@ -1,6 +1,6 @@ -package class07; +package class07_10; -public class Code01_RecursiveTraversalBT { +public class Code02_RecursiveTraversalBT { public static class Node { public int value; diff --git a/src/class07/Code02_UnRecursiveTraversalBT.java b/src/class07_10/Code03_UnRecursiveTraversalBT.java similarity index 97% rename from src/class07/Code02_UnRecursiveTraversalBT.java rename to src/class07_10/Code03_UnRecursiveTraversalBT.java index 277e96b..604dc46 100644 --- a/src/class07/Code02_UnRecursiveTraversalBT.java +++ b/src/class07_10/Code03_UnRecursiveTraversalBT.java @@ -1,8 +1,8 @@ -package class07; +package class07_10; import java.util.Stack; -public class Code02_UnRecursiveTraversalBT { +public class Code03_UnRecursiveTraversalBT { public static class Node { public int value; diff --git a/src/class07/Code03_LevelTraversalBT.java b/src/class07_11/Code01_LevelTraversalBT.java similarity index 93% rename from src/class07/Code03_LevelTraversalBT.java rename to src/class07_11/Code01_LevelTraversalBT.java index 34bd6b9..2a377c3 100644 --- a/src/class07/Code03_LevelTraversalBT.java +++ b/src/class07_11/Code01_LevelTraversalBT.java @@ -1,9 +1,9 @@ -package class07; +package class07_11; import java.util.LinkedList; import java.util.Queue; -public class Code03_LevelTraversalBT { +public class Code01_LevelTraversalBT { public static class Node { public int value; diff --git a/src/class07/Code04_SerializeAndReconstructTree.java b/src/class07_11/Code02_SerializeAndReconstructTree.java similarity index 98% rename from src/class07/Code04_SerializeAndReconstructTree.java rename to src/class07_11/Code02_SerializeAndReconstructTree.java index fecd6ac..9ea02bb 100644 --- a/src/class07/Code04_SerializeAndReconstructTree.java +++ b/src/class07_11/Code02_SerializeAndReconstructTree.java @@ -1,10 +1,10 @@ -package class07; +package class07_11; import java.util.LinkedList; import java.util.Queue; import java.util.Stack; -public class Code04_SerializeAndReconstructTree { +public class Code02_SerializeAndReconstructTree { /* * 二叉树可以通过先序、后序或者按层遍历的方式序列化和反序列化, * 以下代码全部实现了。 diff --git a/src/class07/Code05_PrintBinaryTree.java b/src/class07_11/Code03_PrintBinaryTree.java similarity index 96% rename from src/class07/Code05_PrintBinaryTree.java rename to src/class07_11/Code03_PrintBinaryTree.java index 57adbca..955e726 100644 --- a/src/class07/Code05_PrintBinaryTree.java +++ b/src/class07_11/Code03_PrintBinaryTree.java @@ -1,6 +1,6 @@ -package class07; +package class07_11; -public class Code05_PrintBinaryTree { +public class Code03_PrintBinaryTree { public static class Node { public int value; diff --git a/src/class07/Code06_TreeMaxWidth.java b/src/class07_11/Code04_TreeMaxWidth.java similarity index 97% rename from src/class07/Code06_TreeMaxWidth.java rename to src/class07_11/Code04_TreeMaxWidth.java index de2c7d6..4aad4f3 100644 --- a/src/class07/Code06_TreeMaxWidth.java +++ b/src/class07_11/Code04_TreeMaxWidth.java @@ -1,10 +1,10 @@ -package class07; +package class07_11; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; -public class Code06_TreeMaxWidth { +public class Code04_TreeMaxWidth { public static class Node { public int value; diff --git a/src/class07/Code07_SuccessorNode.java b/src/class07_11/Code05_SuccessorNode.java similarity index 97% rename from src/class07/Code07_SuccessorNode.java rename to src/class07_11/Code05_SuccessorNode.java index ba365e3..6440ce7 100644 --- a/src/class07/Code07_SuccessorNode.java +++ b/src/class07_11/Code05_SuccessorNode.java @@ -1,6 +1,6 @@ -package class07; +package class07_11; -public class Code07_SuccessorNode { +public class Code05_SuccessorNode { public static class Node { public int value; diff --git a/src/class07/Code08_PaperFolding.java b/src/class07_11/Code06_PaperFolding.java similarity index 90% rename from src/class07/Code08_PaperFolding.java rename to src/class07_11/Code06_PaperFolding.java index 230b47d..349cd58 100644 --- a/src/class07/Code08_PaperFolding.java +++ b/src/class07_11/Code06_PaperFolding.java @@ -1,6 +1,6 @@ -package class07; +package class07_11; -public class Code08_PaperFolding { +public class Code06_PaperFolding { public static void printAllFolds(int N) { printProcess(1, N, true);