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.
depends what you use it for. c++ = object oriented c = not object oriented
Microsoft Visual C++ or Embarcadero C++ Builder (formally Borland C++ Builder).
www.cplusplus.com
The best advice would be to purchase a C++ primer.
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_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]; } } } }
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.
The best programs are written by humans, not by softwares.
See related links.
The quicksort algorithm is considered the best for efficiency and performance among sorting algorithms.
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.
Dev c++ is a good tool, but it's outdated. VS is the best for software development especially with shareware license.