Boley
Sunday, 15 September 2013
how to calculate the time complexity for the following code?
how to calculate the time complexity for the following code?
For (int i=1; i <=n;i/=2){
System.out.println(i);
}
For the time complexity about the above coding, is ot log (n)?
Thanks!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment