Question about time complexity

Revision en1, by tweety, 2015-08-05 01:01:53

If I had in my algorithm something like this:

for (int i = 0; i < n; i++) if (i % 2) continue; else { code code code... }

Will the time complexity be O(n) or O(n / 2)?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English tweety 2015-08-05 01:01:53 233 Initial revision (published)