Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
Sorting algorithms/Insertion sort (view source)
Revision as of 08:26, 13 September 2010
, 13 years agoMark as using wikipedia content (the algorithm description)
(→{{header|Icon}}: brief) |
m (Mark as using wikipedia content (the algorithm description)) |
||
Line 1:
{{task|Sorting Algorithms}}
{{Sorting Algorithm}}
{{wikipedia|Insertion sort}}
An <span style="font-family: serif">[[O]](''n''<sup>2</sup>)</span> sorting algorithm which moves elements one at a time into the correct position. The algorithm consists of inserting one element at a time into the previously sorted part of the array, moving higher ranked elements up as necessary. To start off, the first (or smallest, or any arbitrary) element of the unsorted array is considered to be the sorted part.
|