Gregory M. Kapfhammer

Introduction to Computer Science II

Office Hours, Email, Web, Twitter

Algorithms

Correctness

Performance

How *fast* is an algorithm?

Try some *examples*!

Constant

Linear

Quadratic

Cubic

git pull

CLASSPATH

Compile

Algorithm

Function

Draw a *Graph*

Function *Exploration*

Conclusions?

Implications?

Take a step back

Characterize *programs* as functions of *input* size

Hands-on Example

Largest Integer?

Computing Sums

Correct?

Incorrect?

Conduct an *Experiment*

Why?

Pseudo code

When *n* gets big

Revisit computing sums

Best, Worst, Average

f(n) *is* O(g(n))

f(n) is *O*(g(n))

f(n) is O(*g(n)*)