/// <summary> /// Sorts user's array. /// </summary> /// <param name="array">Array for sorting.</param> /// <param name="comparer">Sort comparer.</param> public static void Sorter(int[][] array, IComparer comparer) { for (int i = 0; i < array.Length; i++) { for (int j = i + 1; j < array.Length; j++) { if (comparer.ToCompare(array[i], array[j]) > 0) { Swap(ref array[i], ref array[j]); } } } }