예제 #1
0
        public static void Test()
        {
            Solution s = new Solution();

            int?[] a4 = new int?[] { 3 };
            int?[] a5 = new int?[] { 1, 2, 3, 4, 5, 6, null, null, null, 7, 8 };


            string[] words1 = new[] { "hello", "leetcode" };
            string   order1 = "hlabcdefgijkmnopqrstuvwxyz";

            Console.WriteLine(s.IsAlienSorted(words1, order1) + " is true");

            string[] words2 = new[] { "word", "world", "row" };
            string   order2 = "worldabcefghijkmnpqstuvxyz";

            Console.WriteLine(s.IsAlienSorted(words2, order2) + " is false");

            string[] words3 = new[] { "apple", "app" };
            string   order3 = "abcdefghijklmnopqrstuvwxyz";

            Console.WriteLine(s.IsAlienSorted(words3, order3) + " is false");
        }