Description: traditional Bubble Sort method is operated : former next, followed by two more adjacent elements, if Roget will exchange value of the two elements, and then continue later operation; The tail of the data, it found a maximum (or minimum). Then repeat the operation of the above n-1 (n is the number of elements). The improvements : In accordance with the above approach to the operation of the first scanning the maximum (or minimum number) onto the surface of the final location of the second scan in fact only need to scan the penultimate position can be, a place for the final judgment has not come to the end of operation are similar. Such procedures can reduce the run time.
To Search:
File list (Check if you may need any files):