Can not figure out complexity of this recurrence

前端 未结 4 687
借酒劲吻你
借酒劲吻你 2021-01-21 07:21

I am refreshing on Master Theorem a bit and I am trying to figure out the running time of an algorithm that solves a problem of size n by recursively solving 2 subp

4条回答
  •  清酒与你
    2021-01-21 07:44

    Looks like you can't formulate this problem in terms of the Master Theorem.

    A good start is to draw the recursion tree to understand the pattern, then prove it with the substitution method. You can also expand the formula a couple of times and see where it leads.

    See also this question which solves 2 subproblems instead of a: Time bound for recursive algorithm with constant combination time

提交回复
热议问题