예제 #1
0
        public void TestFirstCase()
        {
            var tree   = new TreeNode(3, new TreeNode(9), new TreeNode(20, new TreeNode(15), new TreeNode(7)));
            var sol    = new LevelOrderTraversal(tree);
            var result = sol.LevelOrderBottom();

            Assert.NotNull(result);
        }
예제 #2
0
        public IList <IList <int> > LevelOrderBottom(TreeNode root)
        {
            var result = new LevelOrderTraversal(root);

            return(result.LevelOrderBottom());
        }