please can any one say the number of iterations for all sorting methods ...that is for bubble sort,selection sort,insertion sort,quick sort ,merge sort,heapsort ....
please reply soon....
please can any one say the number of iterations for all sorting methods ...that is for bubble sort,selection sort,insertion sort,quick sort ,merge sort,heapsort ....
please reply soon....
The number of iterations needed to sort, will vary considerably depending on the number of items there are to sort, as well as the algorithm you choose.
Even a non-comparison sorting algorithm like Counting Sort, will have to iterate through once, for each item to be sorted.
It's very instructive to count them up, for say 25 or 100 items. You'll be surprised at the variances between algorithms, in iterations, comparisons made, and swaps made.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.