2

For example, we have $T(N) = T(N/2) + T(N/5) + O(N)$. So:

$2T(N/2) + O(N) \leq T(N) \leq 2T(N/5) + O(N)$

$O(N) \leq T(N) \leq O(N)$. Thus, $T(N) = O(N)$. Is it correct?

Maczinga
  • 460
  • 2
  • 8
Alexander
  • 21
  • 2

0 Answers0