Algorithms and Data StructuresDr. Andreas NüchterSeptember 22, 2009157Last Lecture – Introduction To SortingThe sorting problem:Given: keys Wanted: Find a permutation of such thatWe may only use key comparisons of the formwith the semantic:
Algorithms and Data StructuresDr. Andreas NüchterSeptember 22, 2009158Last Lecture – Basic Sorting MethodsSorting by SelectionIdea: Bring in every step the smallest element of the sequence to the first position.PositionKeysFinal result
This preview has intentionally blurred sections.
Sign up to view the full version.