There was an error while loading. Please reload this page.
1 parent dd29350 commit 31566acCopy full SHA for 31566ac
C#/Algorithms/Searching-Algorithms/BinarySearchTree/BinarySearchTree.cs
@@ -1,7 +1,9 @@
1
-using System;
+// C# implementation of a binary search tree
2
+using System;
3
4
namespace DataStructures
5
{
6
+ // Will add values to thr tree and organize
7
class BinarySearchTree<T> where T : IComparable<T>
8
9
public BinarySearchTree<T> Left;
@@ -43,7 +45,8 @@ public void Add(T newValue)
43
45
}
44
46
47
- public static void TestBST()
48
+ // Driver to test
49
+ public static void Main()
50
51
var bst = new BinarySearchTree<int>(69);
52
bst.Add(42);
0 commit comments