예제 #1
0
파일: LcrsTrie.cs 프로젝트: mpvyard/resin
        public IEnumerable <LcrsTrie> AllNodesDepthFirst()
        {
            yield return(this);

            if (LeftChild != null)
            {
                foreach (var node in LeftChild.AllNodesDepthFirst())
                {
                    yield return(node);
                }
            }

            if (RightSibling != null)
            {
                foreach (var node in RightSibling.AllNodesDepthFirst())
                {
                    yield return(node);
                }
            }
        }