Esempio n. 1
0
        private static void binarySearchTree()
        {
            var node = new Node(10);

            node.insert(5);
            node.insert(15);
            node.insert(8);

            Console.WriteLine($"Contains '8'?: [{node.contains(8)}]");

            Console.WriteLine($"  InOrder: {node.printInOrder()}");
            Console.WriteLine($" PreOrder: {node.printPreOrder()}");
            Console.WriteLine($"PostOrder: {node.printPostOrder()}");
        }