Basics of basic sorting
Basic sorting algorithm type 1. Select sort
Select the smallest element in the array, swap it with the first element in the array, and then find the minor element. and swap it with the second element in the array ... Until the entire array is sorted. That is, by constantly selecting the smallest element in the remaining array to implement.
2. Insert sort and Hill sort
By constructing an ordered sequence, a backward-forward scan is made in the sorted sequence for unordered data. Locate the corresponding position insert.
Therefore, in the process of backward forward scanning, it is necessary to re-shift the ordered elements gradually. Provides the insertion space for the newest element.
3. Bubble sort
Traversing the file, assuming that the next 2 elements are not in the correct order of size, swap the two, repeat until sorted
4. Index and pointer sorting, list sorting, keyword sorting
Index and pointer ordering, list ordering: Indirect ordering, flexibility, and no changes to the original data and keyword information.
Basic Sort (V): Summary of basic sorting algorithm