Improving efficiency of Bubble Sort.