Computer Basics - a variety of commonly used sorting algorithm

stability

Unstable: Hill sorting, direct selection, heap sort, quick sort

Stability: direct insertion sort, bubble sort, merge sort, radix sort

 

Hill is the basic idea of ​​the sort: the entire sequence of records to be sorted first divided into several sub-sequences respectively direct insertion sort, until the entire record in the sequence of "basic order", the re-recording of all direct insertion sort order.

 

When the use of efficient insertion sort?

Small or basic data is very orderly and efficient, the higher the degree of ordering data, more efficient

Hill Sort: large-scale data and disorderly

 

Guess you like

Origin www.cnblogs.com/songsongblue/p/11594559.html