Computer Science Canada optimize sort |
Author: | the_binary_soul [ Tue Feb 15, 2005 10:24 am ] | ||
Post subject: | optimize sort | ||
Hello. I'm working on a gr 12. review for a compsci class, and I can't for the life of me how to optimize this sort. this is the code I have so far.
It is simply to sort the array lowest to highest and needs to be optimized |
Author: | Delos [ Tue Feb 15, 2005 10:42 am ] |
Post subject: | |
Right now you have the wonderfully simple Bubble sort implemented. This is a sinch to programme, but boy is it slow and inefficient. Search for "sort" in Turing Source Code, and you should find a thread by zylum that shows a lot of really good (and some not so good) sorts. Basically, you can't optimize that particular sort very much more. It's about as good as it gets. You need a new sort. This place has a lot of ideas that you can use to make a better sort. Just look around and read the descriptions. |
Author: | the_binary_soul [ Tue Feb 15, 2005 10:43 am ] |
Post subject: | |
thanks |