Lecture 6
Learning objectives
After this class, you should be able to:
- Given an algorithm, derive its asymptotic time complexity.
- Prove properties of big-oh, big-omega, and big-theta.
Reading assignment
- Chapter 2.
- Class notes.
- Lecture: Algorithm Analysis Examples.
- Pages 74-76.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Prove that
high-low+1 decreases by a factor of at least 2 in each iteration of the binary search algorithm.
- Prove that
n3 + n is O(n3) directly from the definition of big-O. Show constants c and n0 that satisfy the definition.
- Questions on next lecture's material
- Write a small piece of code that inserts a few numbers into a STL
vector of floats and then output each number.
- Explain the operations on the STL
list in the vlm.cpp from lecture 4.
Last modified: 7 Sep 2014