Sorting algorithms are often classified by the following, except?
Computational complexity of swaps
None of the options is correct
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.