Next:
Up:
Previous:
Now let's try subtracting a lower-order term:
We know cn - b
O(n).
Guess:
T(n) = O(n)
Show:
T(n) <= cn - b
Assume:
T(n/2) <= cn/2 - b
T(n) = 2T(n/2) + 1
T(n)
2(cn/2 - b) + 1
= cn - 2b + 1
cn - b
True if b - 1
0, b
1 (okay)
Next:
Up:
Previous: