308-203A Introduction to Computing II Lecture 5: Complexity of Algorithms

9/20/00


Click here to start


Table of Contents

308-203A Introduction to Computing II Lecture 5: Complexity of Algorithms

How long does a program take to run?

To Quantify That...

Do constants matter?

The Big O( )

The Big O( )

The Big O( )

Examples

Worst Case Analysis

Worst Case Analysis

Best-case Analysis

Intuitively...

A little more notation

Some Things to Note

More examples:

More examples:

More examples:

The parameter is important!

The parameter is important!

So what is O(1) in Java

So what is not O(1) in Java

Another example: Exponentiation

Another example: Exponentiation

Better Exponentiation

Better Exponentiation

Order of Growth??

Any questions?

Author: Alfred Holz

Email: wrenne@acm.org

Home Page: http://www.cs.mcgill.ca/~cs203