About 772,000 results
Open links in new tab
  1. Which sorting algorithm is used by .NET's Array.Sort() method?

    Dec 6, 2009 · Array.Sort() chooses one of three sorting algorithm, depending on the size of the input: If the size is fewer than 16 elements, it uses an insertion sort algorithm. If the size exceeds 2 * log^N , where N is the range of the input array, it uses a Heap Sort algorithm.

  2. Array.Sort Method (System) | Microsoft Learn

    Sorts the elements in a one-dimensional array. Sorts a range of elements in a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer.

  3. C# : Most used Five Sorting Algorithms in .Net

    In this blog post, we'll delve into five popular sorting algorithms implemented in C#: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, and Quick Sort. We'll explore each algorithm's principles, implementation details, and performance characteristics.

  4. Which sorting algorithm is used by .NET's Array.Sort () method?

    Jan 13, 2022 · Starting with .NET 4.5 it uses introspective sorting. Refer to the docs for links on the algorithms. It uses the QuickSort algorithm. Is it true?

  5. What sorting algorithm does the .NET framework implement

    May 11, 2011 · This method uses Array.Sort, which uses the QuickSort algorithm. The Enumerable.OrderBy<TSource, TKey> method (which sorts a copy of an input sequence) uses a stable Quicksort . As far as I know, these are the only …

  6. Built-in sorting algorithms in C# - Tutorials.eu

    Jan 25, 2023 · In summary, C# provides a variety of built-in options for sorting data, including the Array.Sort() and List<T>.Sort() methods, which use the QuickSort algorithm, and the ability to use custom comparers and comparison delegates.

  7. Sorting Algorithms in C# - Code Maze

    Sorting algorithms are very useful when we need a quick way to sort an array of elements. Here are some of them.

  8. Understanding C# Sorting Algorithms Like a Pro - Toxigon

    Apr 4, 2025 · The Basics of Sorting Algorithms What Are Sorting Algorithms? Sorting algorithms are like recipes for putting things in order. They tell you step-by-step how to arrange a list of items. In C#, you can use these algorithms to sort arrays, lists, and other collections of data.

  9. Basic Sorting Algorithms In C# .NET – .NET Core Tutorials

    Learning basic sorting algorithms is a bit of a Computer Science 101 class. But many examples out there are either in pesudocode, or languages more suited to large computation (e.x. Python). So I thought I would quickly go over the three basic …

  10. C# Sorting algorithms implementation - Microsoft Q&A

    Apr 26, 2023 · Insertion Sort is a simple sorting algorithm that builds the resulting sorted array on an item-by-item basis using matching. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort or merge sort. int n = 10; int value; int flag; for (int i = 1; i < n; i++) value = array[i]; flag = 0;

  11. Some results have been removed
Refresh