I had a test today where I had to find the algorithmic complexity (Big-Oh notation) for a time equation.
T(n) = T(n-2) +1
Well, I would like to know if somebody knows the compexity of this algorithm (so I can know if me or my friends are right
We had 3 different answer : O(n), O(logn), O(2^n)
So if you know well how to do these, feel free to give a though
T(n) = T(n-2) +1
Well, I would like to know if somebody knows the compexity of this algorithm (so I can know if me or my friends are right
We had 3 different answer : O(n), O(logn), O(2^n)
So if you know well how to do these, feel free to give a though