Tag Archives: quicksort

Compare sorting algorithms in C#, article 5 of 5

Countingsort The discussion of Quicksort in my previous post mentions that the fastest possible sorting algorithms that use comparisons take on the order of N * log(N) steps. Countingsort does not use comparisons so it is not bound by that … Continue reading

Posted in algorithms, performance | Tagged , , , , , , , , , , , , , , | Leave a comment

Compare sorting algorithms in C#, part 4 of 5

Quicksort Quicksort is a recursive algorithm that uses a divide-and-conquer technique. While the list of items to be sorted contains at least two items, Quicksort divides it into two sublists and recursively calls itself to sort the sublists. The Quicksort … Continue reading

Posted in algorithms, performance | Tagged , , , , , , , , , , , , , | Leave a comment

Compare sorting algorithms in C#, part 3 of 5

Selectionsort Selectionsort is a very simple algorithm. First you search the list for the smallest item. Then you swap that item with the item at the top of the list. Next you find the second smallest item and swap it … Continue reading

Posted in algorithms, performance | Tagged , , , , , , , , , , , , , , | Leave a comment

Compare sorting algorithms in C#, part 2 of 5

Bubblesort Bubblesort is a specialized algorithm designed for sorting items that are already mostly in sorted order. If only one or two items in your list are out of order, Bubblesort is very fast. If the items in your list … Continue reading

Posted in algorithms, performance | Tagged , , , , , , , , , , , , , , | Leave a comment

Compare sorting algorithms in C#, post 1 of 5

This post begins a series of articles about sorting algorithms. Much of the text originally appeared in the December 1995 issue of Visual Basic Developer magazine, a publication that seems to no longer exist. All of these posts include the … Continue reading

Posted in algorithms, performance | Tagged , , , , , , , , , , , , , , | 6 Comments