示例#1
0
        static void Main(string[] args)
        {
            string[] words = new string[] { "practice", "makes", "coding", "perfect", "makes" };

            words ws     = new words(words);
            var   result = ws.wordList;

            Console.WriteLine(string.Join(',', result));



            string word1 = "practice";
            string word2 = "coding";

            var num = ws.shortestDistance(word1, word2);

            Console.WriteLine(num);
        }