Thursday, 15 July 2010

Time complexity of program that run infinitely -



Time complexity of program that run infinitely -

does time complexity of next segment of programme o(2^n)? i’m confused

n=1; j=1 n output(j); n=2*n; end {for}

no, o(n).

you raising n 2^n power.

this because number of iterations of loop "n", regardless of final reply or computation within it.

time-complexity

No comments:

Post a Comment