|
I think you should learn about other sorts. I personally have never used BubbleSort, but I have used others like SelectionSort, InsertionSort, QuickSort and MergeSort. I recommend MergeSort. It's pretty cool once you understand how it works. Basically, it splits up the data in half, and does it over and over again through recursion, and then sorts the simplest set. Here:
2 4 5 1 9 3 8 7
__________________________
2 4 5 1 | 9 3 8 7
__________________________
2 4 | 5 1 | 9 3 | 8 7|
_________________________
Now, sort each part
__________________________
2 4 | 1 5 | 3 9 | 7 8 |
etc.
Maybe you already know about MergeSort, and my reply doesn't really help you with your problem, so I'm sorry if that's the case.
__________________
//Haha javac, can't see me now, can ya?
|