2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,6 +1,8 @@
|
|||
{{Sorting Algorithm}}
|
||||
{{wikipedia|Insertion sort}}
|
||||
{{omit from|GUISS}}
|
||||
|
||||
<br>
|
||||
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.
|
||||
|
|
@ -22,3 +24,4 @@ The algorithm is as follows (from [[wp:Insertion_sort#Algorithm|wikipedia]]):
|
|||
'''done'''
|
||||
|
||||
Writing the algorithm for integers will suffice.
|
||||
<br><br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue