/// <summary> /// Sorts the given <see cref="IList{T}"/> using the <see cref="IComparer{T}"/>. /// This method uses the Tim sort /// algorithm, but falls back to binary sort for small lists. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="list">this <see cref="IList{T}"/></param> /// <param name="comparer">The <see cref="IComparer{T}"/> to use for the sort.</param> public static void TimSort <T>(this IList <T> list, IComparer <T> comparer) { CollectionUtil.TimSort(list, comparer); }
/// <summary> /// Sorts the given <see cref="IList{T}"/> using the <see cref="IComparer{T}"/>. /// This method uses the Tim sort /// algorithm, but falls back to binary sort for small lists. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="list">this <see cref="IList{T}"/></param> public static void TimSort <T>(this IList <T> list) { CollectionUtil.TimSort(list); }