Sorting

Hello, I have some questions about sorting.

In array, I see that there are various ways to sort:
-Bubble sort
-Exchange sort
-Selection sort
-Insert sort
-Shell sort
-Quick sort
-Merge sort

My questions are:
-Do you need to use a specific way to sort?
-What about sort() function?

Thanks!

Off topic question:
If I for example put @supernoob, will that person get notified?
Last edited on
Do you need to use a specific way to sort?
It depends on what you are doing. But...

What about sort() function?
For most in-memory things this works best.

More:
Sort with the C and C++ library functions: http://www.cplusplus.com/faq/sequences/sequencing/sort-stuff/
Specific sorting algorithms: http://www.cplusplus.com/faq/sequences/sequencing/sort-algorithms/
(I think that FAQ page needs a major cleanup...)

If I for example put @supernoob, will that person get notified?
Nope. It's just a textual convention to mean 'hey, I'm talking to supernoob'.

Hope this helps.
Topic archived. No new replies allowed.