예제 #1
0
 public void Print(SortingResult result)
 {
     if (result.Array.Length <= 20)
     {
         for (int i = 0; i < result.Array.Length; i++)
         {
             PrintNumber(result.Array[i]);
         }
     }
     else
     {
         for (int i = 0; i < 10; i++)
         {
             PrintNumber(result.Array[i]);
         }
         Console.Write("... ");
         for (int i = result.Array.Length - 10; i < result.Array.Length; i++)
         {
             PrintNumber(result.Array[i]);
         }
     }
     Console.Write(string.Format("Time: {0} ms", result.Time));
 }
예제 #2
0
 public void PrintLn(SortingResult result)
 {
     Print(result);
     Console.WriteLine("");
 }