C SC 205 Lecture 4: Runtime Performance
major resources: Data Structures and the Java Collections Framework Second Edition,
William Collins, McGraw-Hill, 2005
Introduction to Programming and OO Design
using Java, Niño and Hosch, Wiley & Sons, 2002
[ previous
| schedule
| next ]
Wednesday September 19 (week 2)
Review of Big-O (not Oscar Robertson)
- measure of algorithm not program or computer
- best-, average-, and worst-case behaviors
- counting, coefficients, and dominated terms
- Big O as upper bound -- a O(n) function is also O(n2) -- but we normally use the lowest
- Big Omega as lower bound -- an Omega(n2
) function is also Omega(n)
- Big Theta is both upper and lower bound, there is no containment hierarchy
Big-O performance of various algorithmic sequences
- sequential versus nested loops
- behavior of loop conditions, e.g. sequential versus binary search
- hidden in method calls
- review of a few well known examples: search and sort
Java ArrayList hypothetical implementation
- hypothetical Array implementation
- detemine runtime performance of major operations (get, add, delete)
- hypothetical linked implementation
- concept of a list node
- determine runtime performance of major operations (get, add, delete)
[ C
SC 205 | Peter
Sanderson | Math Sciences server
| Math Sciences home page
| Otterbein ]
Last updated:
Peter Sanderson (PSanderson@otterbein.edu)