Algorithm solves a problem of size as follows: recursively solves 3 subproblems of size
- 2
, and then constructs the answer for the original problem in time (1)
.
It seems obvious that the Master theorem cannot be applied here. So, I thought of drawing a recursion tree, but what bothers me is that do I need to consider two cases: when n
is odd/even? Or the result sum and hence the running time wouldn't depend on this at all? Thanks in advance.