answersLogoWhite

0

Every sorting algorithm has pros and cons; there is no "best" algorithm for every situation. Quick sort is generally considered to be the "best", but even a bubble sort will outperform it when there are relatively few items to consider, and optimisation is required to cater for equal items to ensure they remain in a stable sequence.

The following article compares the efficiency of each of the popular algorithms, but note that the big O times reflect the standard, unoptimised algorithms.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Which is best C or C plus plus?

depends what you use it for. c++ = object oriented c = not object oriented


Which c plus plus best for vista?

Microsoft Visual C++ or Embarcadero C++ Builder (formally Borland C++ Builder).


What is the best website for C plus plus programming?

www.cplusplus.com


How can a beginner get started with C plus plus programming?

The best advice would be to purchase a C++ primer.


Whose sorting is best amongst sorting techniques?

The reason we have so many sorting techniques is that there is no "best." Depending on circumstances, your best bet will usually be either quick sort or merge sort.


Bubble sorting in c plus plus?

bubble_sort (int N, int *A) { int i; swap = 1; while (swap) { swap = 0; for (i=0; i<N-1; ++i) { if (A[i] > A[i+1]) { swap = 1; A[i] ^= A[i+1]; A[i+1] ^= A[i]; A[i] ^= A[i+1]; } } } }


Which sorting technique is the best and why?

The best sorting technique depends heavily on the number and type of elements you are sorting, whether or not the list is partially sorted, if it can be sorted completely in memory or requires external devices, and so forth. There is no best sorting technique; it depends on the sort requirements at the time.


Which are the best softwares used for doing c plus plus programs?

The best programs are written by humans, not by softwares.


Which is the best site for learning c plus plus for beginners?

See related links.


Which sorting algorithm is considered the best for efficiency and performance?

The quicksort algorithm is considered the best for efficiency and performance among sorting algorithms.


Which is the best sorting methad?

There is no one best sorting method. The qsort() function is a good all rounder. The best sorting method depends on what you want to sort and how many items you need to sort and can only be determined by actual testing.


Which is better dev c plus plus or Microsoft Visual C plus plus 2008 Express Edition?

Dev c++ is a good tool, but it's outdated. VS is the best for software development especially with shareware license.