discrete maths objective to describe the big-oh notation for estimating the running time of programs...

71
Discrete Maths Objective to describe the Big-Oh notation for estimating the running time of programs 242-213, Semester 2, 2014-2015 10. Running Time of Programs 1

Upload: maurice-francis

Post on 31-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Discrete Maths

Discrete MathsObjectiveto describe the Big-Oh notation for estimating the running time of programs 242-213, Semester 2, 2014-201510. Running Time of Programs1OverviewRunning TimeBig-Oh and Approximate Running TimeBig-Oh for ProgramsAnalyzing Function CallsAnalyzing Recursive FunctionsFurther Information21. Running TimeWhat is the running time of this program?

void main(){ int i, n; scanf("%d", &n); for(i=0; i