示例#1
0
 public TimeSpan TimeSelectionSort(int[] dataSet)
 {
     stopwatch = new Stopwatch();
     stopwatch.Start();
     SortingAlgoritms.Selectsort(dataSet);
     stopwatch.Stop();
     return(stopwatch.Elapsed);
 }
示例#2
0
        public TimeSpan TimeMergeSort(int[] dataSet)
        {
            stopwatch = new Stopwatch();
            var dataList = dataSet.ToList();

            stopwatch.Start();
            SortingAlgoritms.MergeSort(dataList);
            stopwatch.Stop();
            return(stopwatch.Elapsed);
        }