270 likes | 285 Views
Lecture 3 Sorting and Selection. Comparison Sort. Decision Tree. Running Time. Is there a faster sorting of other type?. Counting sort. Counting sort (Running Time). A Student’s Variation. Counting sort is stable. That is, the same value appear in the output
E N D
Running Time Is there a faster sorting of other type?
Counting sort is stable. That is, the same value appear in the output array in the same order as they do in the input array.
( + low side) contains red part ( + high side) contains blue part
Analysis basis induction
What we learnt in this lecture? • What is “comparison sort”?. • Lower bound for comparison sort. • Counting sort and Radix sort. • What is selection problem? • expected linear time andlinear time selections.