static void ShowResult(SortResult sortResult) { Console.Write("Sorted : "); ShowArray(sortResult.Sorted); Console.WriteLine(); Console.WriteLine($"Sorted result : time: {sortResult.Time:f2} ms"); }
private static bool IsSorted(SortResult result) { for (int i = 1; i < result.SortedArray.Length; i++) { if (result.SortedArray[i].CompareTo(result.SortedArray[i - 1]) < 0) { return(false); } } return(true); }