Japanese programmer Norahiko, wrote a sort algorithm animation demo, very interesting.
This weekend, I use it as a textbook, a good study of a variety of sorting algorithms.
The sorting algorithm (sorting algorithm) is one of the oldest and most basic topics in computer science. To be a qualified programmer, you must understand and master all sorts of sorting algorithms.
At present, the most common sort algorithm is about seven or eight kinds, among which "quick sort" (Quicksort) is used most widely and faster. It is the Turing Prize winner C. A. R. Hoare (1934--) was presented at 1960.
The idea of "quick sort" is simple, and the whole sort process takes only three steps:
(1) In the dataset, select an element as the "datum" (pivot).
(2) All elements less than "datum" are moved to the left of the datum, and all elements greater than "datum" are moved to the right side of the datum.
(3) for the two subsets to the left and right of the "datum", repeat the first and second steps until all subsets are left with only one element.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/script/