I got 10700 record I need to sort them fast as possible I've been reading about types of sorting algorithms but got lost I didn't know what's the best to choose: http://en.wikipedia.org/wiki/Sorting_algorithm
EDIT 1: I need to write down a code that calculates the time of executing the algorithm
EDIT 1-2 : Is there any language that has the functionality of sorting and calculating the time of sorting it ?
And one more question is the language used to implement the algorithms affects the speed ? (e.g if I used c++ will it be faster than java or .Net lang. ?? )
Note this not a Home Work.
Unless this is a homework problem, don't implement your own sorting algorithm.
Use the one already provided by your development environment - it'll be robust, debugged, and almost certainly faster than anything you'll write yourself.
FWIW, the Sort()
method on List<T>
in .NET uses a QuickSort.
The actual environment (C++ vs .NET vs Java) will have negligable impact, unless you're doing this in an absurdly small amount of memory. Use whatever you have experience with.