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

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

Embed Size (px)

Citation preview

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