diff --git a/codes/csharp/chapter_array_and_linkedlist/list.cs b/codes/csharp/chapter_array_and_linkedlist/list.cs
index 9530f24a1..f8874029f 100644
--- a/codes/csharp/chapter_array_and_linkedlist/list.cs
+++ b/codes/csharp/chapter_array_and_linkedlist/list.cs
@@ -1,11 +1,10 @@
-using Newtonsoft.Json.Linq;
+/**
+ * File: list.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Linq;
namespace hello_algo.chapter_array_and_linkedlist
{
diff --git a/codes/csharp/chapter_array_and_linkedlist/my_list.cs b/codes/csharp/chapter_array_and_linkedlist/my_list.cs
index 8ccf35954..7ea09cf04 100644
--- a/codes/csharp/chapter_array_and_linkedlist/my_list.cs
+++ b/codes/csharp/chapter_array_and_linkedlist/my_list.cs
@@ -1,10 +1,10 @@
-using Newtonsoft.Json.Linq;
+/**
+ * File: my_list.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace hello_algo.chapter_array_and_linkedlist
{
diff --git a/codes/csharp/chapter_computational_complexity/leetcode_two_sum.cs b/codes/csharp/chapter_computational_complexity/leetcode_two_sum.cs
index d9498c329..6d45f99b3 100644
--- a/codes/csharp/chapter_computational_complexity/leetcode_two_sum.cs
+++ b/codes/csharp/chapter_computational_complexity/leetcode_two_sum.cs
@@ -1,9 +1,10 @@
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: leetcode_two_sum.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_computational_complexity
{
diff --git a/codes/csharp/chapter_computational_complexity/space_complexity.cs b/codes/csharp/chapter_computational_complexity/space_complexity.cs
index 97a16cdb8..6148bf1b7 100644
--- a/codes/csharp/chapter_computational_complexity/space_complexity.cs
+++ b/codes/csharp/chapter_computational_complexity/space_complexity.cs
@@ -1,10 +1,11 @@
-using hello_algo.include;
+/**
+ * File: space_complexity.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using hello_algo.include;
using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace hello_algo.chapter_computational_complexity
{
diff --git a/codes/csharp/chapter_computational_complexity/time_complexity.cs b/codes/csharp/chapter_computational_complexity/time_complexity.cs
index 71c1036e8..2bbd01763 100644
--- a/codes/csharp/chapter_computational_complexity/time_complexity.cs
+++ b/codes/csharp/chapter_computational_complexity/time_complexity.cs
@@ -1,4 +1,10 @@
-using NUnit.Framework;
+/**
+ * File: time_complexity.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_computational_complexity
{
diff --git a/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs b/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs
index ebbcbeb00..67d9b4efb 100644
--- a/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs
+++ b/codes/csharp/chapter_computational_complexity/worst_best_time_complexity.cs
@@ -1,8 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: worst_best_time_complexity.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
namespace hello_algo.chapter_computational_complexity
{
diff --git a/codes/csharp/chapter_hashing/array_hash_map.cs b/codes/csharp/chapter_hashing/array_hash_map.cs
index cc564e26b..3320fa856 100644
--- a/codes/csharp/chapter_hashing/array_hash_map.cs
+++ b/codes/csharp/chapter_hashing/array_hash_map.cs
@@ -1,7 +1,10 @@
+/**
+ * File: array_hash_map.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
-using hello_algo.include;
using NUnit.Framework;
-using System.Collections.Immutable;
namespace hello_algo.chapter_hashing
{
diff --git a/codes/csharp/chapter_hashing/hash_map.cs b/codes/csharp/chapter_hashing/hash_map.cs
index ff86c88a5..6afcc82c8 100644
--- a/codes/csharp/chapter_hashing/hash_map.cs
+++ b/codes/csharp/chapter_hashing/hash_map.cs
@@ -1,7 +1,12 @@
+/**
+ * File: hash_map.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using hello_algo.include;
using NUnit.Framework;
-using System.Collections.Immutable;
namespace hello_algo.chapter_hashing
{
diff --git a/codes/csharp/chapter_searching/binary_search.cs b/codes/csharp/chapter_searching/binary_search.cs
index bfe688c4d..1bf8a5b2f 100644
--- a/codes/csharp/chapter_searching/binary_search.cs
+++ b/codes/csharp/chapter_searching/binary_search.cs
@@ -1,9 +1,10 @@
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: binary_search.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_searching
{
diff --git a/codes/csharp/chapter_searching/hashing_search.cs b/codes/csharp/chapter_searching/hashing_search.cs
index 6cc5f3481..e4c2f2f2b 100644
--- a/codes/csharp/chapter_searching/hashing_search.cs
+++ b/codes/csharp/chapter_searching/hashing_search.cs
@@ -1,11 +1,11 @@
-using hello_algo.include;
+/**
+ * File: hashing_search.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using hello_algo.include;
using NUnit.Framework;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace hello_algo.chapter_searching
{
diff --git a/codes/csharp/chapter_searching/linear_search.cs b/codes/csharp/chapter_searching/linear_search.cs
index ab22d8d2b..412eb37d3 100644
--- a/codes/csharp/chapter_searching/linear_search.cs
+++ b/codes/csharp/chapter_searching/linear_search.cs
@@ -1,10 +1,11 @@
-using hello_algo.include;
+/**
+ * File: linear_search.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using hello_algo.include;
using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace hello_algo.chapter_searching
{
diff --git a/codes/csharp/chapter_sorting/bubble_sort.cs b/codes/csharp/chapter_sorting/bubble_sort.cs
index 3991f3aa4..9506f7973 100644
--- a/codes/csharp/chapter_sorting/bubble_sort.cs
+++ b/codes/csharp/chapter_sorting/bubble_sort.cs
@@ -1,9 +1,10 @@
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: bubble_sort.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_sorting
{
diff --git a/codes/csharp/chapter_sorting/insertion_sort.cs b/codes/csharp/chapter_sorting/insertion_sort.cs
index 2e03b4fb9..b5f87acf0 100644
--- a/codes/csharp/chapter_sorting/insertion_sort.cs
+++ b/codes/csharp/chapter_sorting/insertion_sort.cs
@@ -1,4 +1,10 @@
-using NUnit.Framework;
+/**
+ * File: insertion_sort.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_sorting
{
diff --git a/codes/csharp/chapter_sorting/merge_sort.cs b/codes/csharp/chapter_sorting/merge_sort.cs
index 11b45829e..d7f9ff985 100644
--- a/codes/csharp/chapter_sorting/merge_sort.cs
+++ b/codes/csharp/chapter_sorting/merge_sort.cs
@@ -1,9 +1,10 @@
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: merge_sort.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_sorting
{
diff --git a/codes/csharp/chapter_sorting/quick_sort.cs b/codes/csharp/chapter_sorting/quick_sort.cs
index ed9c37e0c..020d4f342 100644
--- a/codes/csharp/chapter_sorting/quick_sort.cs
+++ b/codes/csharp/chapter_sorting/quick_sort.cs
@@ -1,9 +1,10 @@
-using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: quick_sort.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using NUnit.Framework;
namespace hello_algo.chapter_sorting
{
diff --git a/codes/csharp/chapter_stack_and_queue/array_queue.cs b/codes/csharp/chapter_stack_and_queue/array_queue.cs
index dc6b1403e..5ad6115ec 100644
--- a/codes/csharp/chapter_stack_and_queue/array_queue.cs
+++ b/codes/csharp/chapter_stack_and_queue/array_queue.cs
@@ -1,5 +1,9 @@
-using System;
-using hello_algo.include;
+/**
+ * File: array_queue.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using NUnit.Framework;
namespace hello_algo.chapter_stack_and_queue
diff --git a/codes/csharp/chapter_stack_and_queue/array_stack.cs b/codes/csharp/chapter_stack_and_queue/array_stack.cs
index 5ce2dae6d..b7ea6df76 100644
--- a/codes/csharp/chapter_stack_and_queue/array_stack.cs
+++ b/codes/csharp/chapter_stack_and_queue/array_stack.cs
@@ -1,5 +1,9 @@
-using System;
-using hello_algo.include;
+/**
+ * File: array_stack.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using NUnit.Framework;
namespace hello_algo.chapter_stack_and_queue
diff --git a/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs b/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs
index 8d7c2796f..70816c8f0 100644
--- a/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs
+++ b/codes/csharp/chapter_stack_and_queue/linkedlist_queue.cs
@@ -1,4 +1,9 @@
-using System;
+/**
+ * File: linkedlist_queue.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using hello_algo.include;
using NUnit.Framework;
diff --git a/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs b/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs
index 5ed82f2e0..78a409449 100644
--- a/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs
+++ b/codes/csharp/chapter_stack_and_queue/linkedlist_stack.cs
@@ -1,4 +1,9 @@
-using System;
+/**
+ * File: linkedlist_stack.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using hello_algo.include;
using NUnit.Framework;
diff --git a/codes/csharp/chapter_stack_and_queue/queue.cs b/codes/csharp/chapter_stack_and_queue/queue.cs
index d1ddbce99..a5ce96953 100644
--- a/codes/csharp/chapter_stack_and_queue/queue.cs
+++ b/codes/csharp/chapter_stack_and_queue/queue.cs
@@ -1,5 +1,9 @@
-using System;
-using hello_algo.include;
+/**
+ * File: queue.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using NUnit.Framework;
namespace hello_algo.chapter_stack_and_queue
diff --git a/codes/csharp/chapter_stack_and_queue/stack.cs b/codes/csharp/chapter_stack_and_queue/stack.cs
index 7be108753..2595dea50 100644
--- a/codes/csharp/chapter_stack_and_queue/stack.cs
+++ b/codes/csharp/chapter_stack_and_queue/stack.cs
@@ -1,6 +1,10 @@
+/**
+ * File: stack.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
using NUnit.Framework;
-using System.Collections.Immutable;
namespace hello_algo.chapter_stack_and_queue
{
@@ -18,7 +22,7 @@ namespace hello_algo.chapter_stack_and_queue
stack.Push(2);
stack.Push(5);
stack.Push(4);
- Console.WriteLine("栈 stack = " + String.Join(",", stack.ToImmutableArray()));
+ Console.WriteLine("栈 stack = " + string.Join(",", stack.ToArray()));
/* 访问栈顶元素 */
int peek = stack.Peek();
@@ -26,7 +30,7 @@ namespace hello_algo.chapter_stack_and_queue
/* 元素出栈 */
int pop = stack.Pop();
- Console.WriteLine("出栈元素 pop = " + pop + ",出栈后 stack = " + String.Join(",", stack.ToImmutableArray()));
+ Console.WriteLine("出栈元素 pop = " + pop + ",出栈后 stack = " + string.Join(",", stack.ToArray()));
/* 获取栈的长度 */
int size = stack.Count();
diff --git a/codes/csharp/chapter_tree/avl_tree.cs b/codes/csharp/chapter_tree/avl_tree.cs
index 8d6a282b7..7cef62318 100644
--- a/codes/csharp/chapter_tree/avl_tree.cs
+++ b/codes/csharp/chapter_tree/avl_tree.cs
@@ -1,6 +1,11 @@
-using hello_algo.include;
+/**
+ * File: avl_tree.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using hello_algo.include;
using NUnit.Framework;
-using System.Collections.Generic;
namespace hello_algo.chapter_tree
{
@@ -69,7 +74,7 @@ namespace hello_algo.chapter_tree
}
/* 执行旋转操作,使该子树重新恢复平衡 */
- private TreeNode? rotate(TreeNode? node)
+ TreeNode? rotate(TreeNode? node)
{
if (node == null)
return node;
diff --git a/codes/csharp/chapter_tree/binary_search_tree.cs b/codes/csharp/chapter_tree/binary_search_tree.cs
index 9d52d000f..00958dcba 100644
--- a/codes/csharp/chapter_tree/binary_search_tree.cs
+++ b/codes/csharp/chapter_tree/binary_search_tree.cs
@@ -1,7 +1,11 @@
-using hello_algo.include;
-using NUnit.Framework;
-using System.Collections.Generic;
+/**
+ * File: binary_search_tree.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+using hello_algo.include;
+using NUnit.Framework;
namespace hello_algo.chapter_tree
{
@@ -31,11 +35,7 @@ namespace hello_algo.chapter_tree
return cur;
}
- ///
- /// 插入结点
- ///
- ///
- ///
+ /* 插入结点 */
TreeNode? insert(int num)
{
// 若树为空,直接提前返回
diff --git a/codes/csharp/chapter_tree/binary_tree.cs b/codes/csharp/chapter_tree/binary_tree.cs
index d3893e79d..88b5f767e 100644
--- a/codes/csharp/chapter_tree/binary_tree.cs
+++ b/codes/csharp/chapter_tree/binary_tree.cs
@@ -1,7 +1,11 @@
+/**
+ * File: binary_tree.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
using hello_algo.include;
using NUnit.Framework;
-using System.Collections.Generic;
-
namespace hello_algo.chapter_tree
{
diff --git a/codes/csharp/chapter_tree/binary_tree_bfs.cs b/codes/csharp/chapter_tree/binary_tree_bfs.cs
index 2715783a8..b686c8892 100644
--- a/codes/csharp/chapter_tree/binary_tree_bfs.cs
+++ b/codes/csharp/chapter_tree/binary_tree_bfs.cs
@@ -1,4 +1,10 @@
-using hello_algo.include;
+/**
+ * File: binary_tree_bfs.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
+using hello_algo.include;
using NUnit.Framework;
namespace hello_algo.chapter_tree
diff --git a/codes/csharp/include/PrintUtil.cs b/codes/csharp/include/PrintUtil.cs
index bdd436ea3..3249c3ea6 100644
--- a/codes/csharp/include/PrintUtil.cs
+++ b/codes/csharp/include/PrintUtil.cs
@@ -1,9 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.SymbolStore;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/**
+ * File: PrintUtil.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
namespace hello_algo.include
{
diff --git a/codes/csharp/include/TreeNode.cs b/codes/csharp/include/TreeNode.cs
index d9130b226..69dd59b4c 100644
--- a/codes/csharp/include/TreeNode.cs
+++ b/codes/csharp/include/TreeNode.cs
@@ -1,3 +1,9 @@
+/**
+ * File: TreeNode.cs
+ * Created Time: 2022-12-23
+ * Author: haptear (haptear@hotmail.com)
+ */
+
namespace hello_algo.include
{
public class TreeNode