Re-Written Delete method on Binary Tree

This commit is contained in:
2022-04-17 23:14:18 +01:00
parent 6ae360f3bc
commit 564e4d161f
2 changed files with 33 additions and 24 deletions

View File

@ -112,15 +112,17 @@ Console.WriteLine("Hello, World!");
Tree<int> tree = new Tree<int>();
tree.Add(5);
tree.Add(4);
tree.Add(10);
tree.Add(8);
tree.Add(6);
tree.Add(3);
tree.Add(4);
tree.Add(5);
tree.Add(2);
tree.Add(1);
tree.Add(0);
var x = tree.Delete(3);
var x = tree.Delete(10);
//tree.Delete(5);
var l = tree.Inorder(null);