Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If this is not a learning task, the purpose of which is to learn how to write a sort, use the standard one.
Selection sort works for the square of the number of elements. An array of 1000 elements will require about 1,000,000 comparisons.
Standard is a variation on the theme of quick sort. Runs in O(n * log(n)). This is about 100 times faster.
The larger the array, the larger the gap will be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question