Content deleted Content added
→Others: Note |
All recursive algorithms can be trivially rewritten as iterative algorithms, and vice versa. However, some algorithms are naturally well suited for recursion, and some are not. |
||
Line 26:
** Swaps for "in-place" algorithms.
* [[Memory (computing)|Memory]] usage (and use of other computer resources). In particular, some sorting algorithms are "[[in-place]]". Strictly, an in-place sort needs only O(1) memory beyond the items being sorted; sometimes O(log ''n'') additional memory is considered "in-place".
* Recursion: Some algorithms are either typically recursive or typically non-recursive, while others may typically be both (e.g., merge sort).
* Stability: [[#Stability|stable sorting algorithms]] maintain the relative order of records with equal keys (i.e., values).
* Whether or not they are a [[comparison sort]]. A comparison sort examines the data only by comparing two elements with a comparison operator.
|