Sorting algorithms

Which is the best sorting algorithm and why? I know again that it depends on the implementation but how do you select that a particular one is the best one to implement. In other words what are the factors for selecting a sorting algorithm?

Questions by anabarai   answers by anabarai

Showing Answers 1 - 2 of 2 Answers

the best sorting algorithm is quick sort as it is O(nlogn) and will be able to process the input data fast even in case of very large n. In case of small n ,insertion sort is best and when the range of numbers is less(around 1000), quicksort is the best algorithm. If you want a much faster algorithm then you can use stl sort

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions