Sorting algorithms are often classified by the following, except?
Computational complexity
Computational complexity of swaps
Recursion
None of the options is correct
1
Expert's answer
2015-04-28T03:23:35-0400
Solution:
Sortingalgorithms are often classified by:
- Computational complexity (worst, average and bestbehavior) of element comparisons in terms of the size of the list (n). For typical serial sorting algorithms good behavio r- Computational complexity ofswaps (for inplace algorithms). - Memoryusage (and use of other computer resources). In particular, some sorting algorithms are in place. - Recursion. Some algorithms are eitherrecursive or non-recursive, while others may be both (e.g., “Merge Sort”). - Stability:stable sorting algorithms maintain the relative order of records with equal keys (i.e., values). - Whetheror not they are a comparison sort. A comparison sort examines the data only by comparing two elements with a comparison operator. - Generalmethod: insertion, exchange, selection, merging, etc. Exchange sorts include bubble sort and quicksort. Selection sorts include shaker sort and heapsort. Also whether the algorithm is serial or parallel. The remainder of this discussion almost exclusively concentrates upon serial algorithms and assumes serial operation. - Adaptability:Whether or not the presortedness of the input affects the running time. Algorithms that take this into account are known to be adaptive.
Comments
Leave a comment