Ejemplo n.º 1
0
        public List <bool> TraverseTree(char character, List <bool> data)
        {
            if (!isBranch())
            {
                if (character == this.Character)
                {
                    return(data);
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                List <bool> left  = data.ToArray().ToList();
                List <bool> right = data.ToArray().ToList();



                left.Add(true);
                right.Add(false);

                return(RightNode.TraverseTree(character, right) ?? LeftNode.TraverseTree(character, left));
            }
        }