Sorting Attributes
Sorts have many attributes. You should learn to study
a sort and determine if it has the following properties.
- Pure or imperative
- The cost in terms of time. This is the one-egg-metric idea.
We usually express this as a proportionality to the number of elements being sorted or other key property.
For example a sort might be proportional to n^2 where n is the number
of elements.
- The cost in terms of space to store intermediate data.
- Whether the sort is stable.
- Any special requirements on the input data.
Back to the Daily Record.
Back to the class web-page.