Esempio n. 1
0
        public IEnumerable <IBinaryTreeNode <TItem> > TraversePostorder()
        {
            var nodes = new List <IBinaryTreeNode <TItem> >();

            if (RightNode != null)
            {
                nodes.AddRange(RightNode.TraversePostorder());
            }
            nodes.Add(this);
            if (LeftNode != null)
            {
                nodes.AddRange(LeftNode.TraversePostorder());
            }
            return(nodes);
        }