Ejemplo n.º 1
0
        public IEnumerable <string> Find(string chars)
        {
            var result    = new List <string>();
            var wordChars = new WordCharacters(chars);

            foreach (var child in Children.Values)
            {
                child.Visit(wordChars.Clone(), result);
            }
            return(result);
        }
Ejemplo n.º 2
0
 internal void Visit(WordCharacters chars, List <string> results)
 {
     if (chars.Take(Current))
     {
         if (IsWord)
         {
             results.Add(chars.Word);
         }
         foreach (var child in Children.Values)
         {
             child.Visit(chars.Clone(), results);
         }
     }
 }
Ejemplo n.º 3
0
 public WordCharacters(WordCharacters chars)
 {
     _remainingChars = new List <char>(chars._remainingChars);
     _takenChars     = new List <char>(chars._takenChars);
 }