Ejemplo n.º 1
0
        public static void LevelOrderTest()
        {
            var root = SortedArrayToBinarySearchTree.SortedArrayToBST(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 });

            //LevelOrderTraversal.LevelOrderTraversalIterative1(root);
            Console.WriteLine();
            //LevelOrderTraversal.LevelOrderTraversalIterative3(root);
            LevelOrderTraversal.LevelOrderBottom(root);
        }
Ejemplo n.º 2
0
 public void LevelOrderTraversalTest()
 {
     TreeNode             root        = buildTreeTest();
     LevelOrderTraversal  lvTraversal = new LevelOrderTraversal();
     IList <IList <int> > levelList   = lvTraversal.LevelOrderBottom(root);
 }