Saturday, June 6, 2009

Find The Complexity

Q: Find Complexity of the Following Code:


int j=0;
for(int i=2; i less than N;i=i^2)
j++;

Hint: it is not lg(N)

No comments:

Post a Comment