/// <summary> /// Sort elements in array. /// </summary> /// <param name="array">passing array</param> /// <param name="left">leftArray border of sorting</param> /// <param name="rihgt">rightArray border of sorting</param> public static void Sort(T[] array, int left, int rihgt) { CheckSortParameters.CheckFullParam(array, left, rihgt); T[] partArray = GetSubArray(array, left, rihgt); Sort(partArray); for (int i = left; i < rihgt; i++) { array[i] = partArray[i]; } }
/// <summary> /// Sort array from left to right border. /// </summary> /// <param name="array">passing array</param> /// <param name="left">left border</param> /// <param name="right">right border</param> public static void Sort(T[] array, int left, int right) { CheckSortParameters.CheckFullParam(array, left, right); SortPart(array, left, right); }