Lecture 33

Learning objectives

After this class, you should be able to:

  1. Given data to be sorted, show the data after each step of (i) bubble sort and (ii) insertion sort.
  2. Derive the time complexity for bubble sort and insertion sort.
  3. If the data is almost sorted, then explain which sorting algorithm would be better, bubble sort or insertion sort.
  4. Derive a lower bound on simple sorting algorithms.

Reading assignment

  1. Section 7, sections 7.2, 7.3.
  2. Lecture: Sorting.

Exercises and review questions


Last modified: 22 Nov 2011