public static void SearchBstTest() { var tree = BSTUtilities.CreateRandomBST(); var test = BSTUtilities.Search(tree._root, 99); Console.WriteLine(test?.data ?? -1); test = BSTUtilities.Search(tree._root, 70); Console.WriteLine(test?.data); }
public static void DeleteKeyFromBstTest() { var tree = BSTUtilities.CreateRandomBST(); var test = BSTUtilities.Search(tree._root, 70); tree.InOrderTraversal(); Console.WriteLine(); var t = BSTUtilities.Delete(tree._root, 70); //Console.WriteLine(BSTUtilities.GetMinimumValue(tree._root.right)); }
public static void InOrderBSTTraversalTest() { var tree = BSTUtilities.CreateRandomBST(); tree.InOrderTraversal(); }