Difference between revisions of "sorting algorithm"

From Lazarus wiki
Jump to navigationJump to search
(structure page, rephrase definition of lemma)
(→‎generic methods: adding link to shellsort algorithm)
Line 10: Line 10:
 
<!-- ordered by complexity -->
 
<!-- ordered by complexity -->
 
* [[Smoothsort]], <!-- O(n log(n)) -->
 
* [[Smoothsort]], <!-- O(n log(n)) -->
* [[Radix sort]], and <!-- O(l⋅n) -->
+
* [[Radix sort]], <!-- O(l⋅n) -->
 +
* [[Shell sort]], and
 
* [[Bubble sort]]. <!-- O(n²) -->
 
* [[Bubble sort]]. <!-- O(n²) -->
  

Revision as of 22:57, 28 January 2021

English (en)

A sorting algorithm is a finite sequence of steps required to put a series of sortable objects into a sorted order.


generic methods

There are several different sorting algorithms. Some sorting algorithms include, for example,

targeted implementation

Some sorting algorithms are tweaked based on the properties the provided objects have or other information about the set of objects. Following sorting algorithms are made for special purposes:

choosing a sorting algorithm

When choosing a sorting algorithm, you should know what purpose it is selected for and under what operating conditions it is used.

see also

  • FGL – the Free Generics Libray – provides templates for collections that can be sorted, without re-inventing the wheel