예제 #1
0
        /// <summary>
        /// 测试类
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //Console.WriteLine("hello world");

            EsayTest.Start();
            MediumTest.Start();
            HardTest.Start();

            Console.ReadKey();
        }
예제 #2
0
 public static string FixedSortingTest(string str)
 {
     return(MediumTest.Sorting(str));
 }
예제 #3
0
 public static string LandscapeType(int[] arr)
 {
     Console.WriteLine($"Input: {arr}");
     return(MediumTest.LandscapeType(arr));
 }
예제 #4
0
 public static string TextToNumberBinary(string str)
 {
     Console.WriteLine($"Input: {str}");
     return(MediumTest.TextToNumberBinary(str));
 }
예제 #5
0
 public static bool SameLetterPattern(string str1, string str2)
 {
     Console.WriteLine($"Input: {str1}, {str2}");
     return(MediumTest.SameLetterPattern(str1, str2));
 }
예제 #6
0
 //[Test]
 //[TestCase("A B C.", ExpectedResult = 1.00)]
 //[TestCase("What a gorgeous day.", ExpectedResult = 4.00)]
 //[TestCase("Dude, this is so awesome!", ExpectedResult = 3.80)]
 //[TestCase("Working on my tan right now.", ExpectedResult = 3.67)]
 //[TestCase("Having a blast partying in Las Vegas.", ExpectedResult = 4.29)]
 //[TestCase("Have you ever wondered what Saturn looks like?", ExpectedResult = 4.75)]
 //[TestCase("I just planted a young oak tree, wonder how tall it will grow in a few years?", ExpectedResult = 3.47)]
 public static double AverageWordLength(string str)
 {
     Console.WriteLine($"Input: {str}");
     return(MediumTest.AverageWordLength(str));
 }
예제 #7
0
 public static int MinTurns(string current, string target)
 {
     Console.WriteLine($"Input: {current}, {target}");
     return(MediumTest.MinTurns(current, target));
 }
예제 #8
0
 public static bool IsAnagram(string current, string target)
 {
     Console.WriteLine($"Input: {current}, {target}");
     return(MediumTest.AnagramStrStr(current, target));
 }
예제 #9
0
 public static bool FixedTest(string password)
 {
     return(MediumTest.ValidatePassword(password));
 }