Sorting Algorithm Analysis
Posted on 2003-11-14
Im working on a program that utilizes many of the sorts and allows me to compare them. However I ran into a situation I am curious about.
For selection sort, for both string and integer sorting, why would the number of comparisons be the same even though the sorting order is different? Then this also poses another question, why would string sorting take more time?
I also just wanted to confirm some of my findings.
Either merge-sort or quick sort is good for large input correct? Is there a best?
Selection / Insertion sort for small input?
Also why does the pivot point matter on quicksort? So less items have to be compared?