Lecture 32
Learning objectives
After this class, you should be able to:
- Define some terms assocated with sorting, such as: (i) in-place sorting, (ii) stable sorting, and (iii) external sorting.
- Write code to sort using the STL
sort
algorithm, and identify the feature containers must have in order for them to be used with this algorithm.- Use a heap to sort an array of data in-place.
Reading assignment
- Section 7, sections 7.1, 7.2.2, 7.5.
- Lecture: Sorting.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Use a max-heap to sort the following array in ascending order:
16 14 10 8 7 9 3 2 4 1
.- Questions on next lecture's material
- None.
Last modified: 14 Nov 2011