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)?
Question about time complexity
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)?