Optimizing of Bubble Sort Algorithm
Chao Lan · Ordnance Industry Automation · 2006
Because of the low efficiency of the Bubble sort algorithm,there were two methods to improve its efficiency.One was to modify three lines instructions in the algorithm.It could set the last exchange position,so it avoided the unnecessary comparisons.The other was to change the scanning directions alternately in the algorithm.It implemented the double directions sort,so it could decrease the times of key comparisons.By means of reducing the times of key comparisons,it could improve the efficiency of the sort algorithm.Thus it achieved the purpose of the optimizing of the Bubble Sort Algorithm.