public List <string> CheckAndAddAnagramsToList(string word, string str, List <string> anagramList)
        {
            AnagramSelector selector = new AnagramSelector();

            if (selector.WordPairIsAnagram(word, str))
            {
                anagramList.Add(str);
            }
            return(anagramList);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Display the number of command line arguments.
            AnagramSelector selector  = new AnagramSelector();
            var             selection = selector.SelectAnagrams("master",
                                                                new List <string> {
                "stream", "something", "maters"
            });

            Console.WriteLine(selection.SequenceEqual(
                                  new List <string> {
                "stream", "maters"
            }));
        }