Content deleted Content added
Tag: repeating characters |
Mindmatrix (talk | contribs) m Reverted edits by 122.167.241.57 (talk) to last version by 124Nick |
||
Line 329:
=== Insertion sort ===
{{Main|Insertion sort}}
''Insertion sort'' is a simple sorting algorithm that is relatively efficient for small lists and mostly-sorted lists, and often is used as part of more sophisticated algorithms. It works by taking elements from the list one by one and inserting them in their correct position into a new sorted list. In arrays, the new list and the remaining elements can share the array's space, but insertion is expensive, requiring shifting all following elements over by one. [[Shell sort]] (see below) is a variant of insertion sort that is more efficient for larger lists.
=== Shell sort ===
|