How to solve T(n) =2T(n/2)+n. using master method or recursion.
The case is straightforward in master theorem. As log_2(2) = 1
and n \in O(n!)
, the result will be T(n) \in Theta(n!)
. Hence, T(n) \in O(n!)
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.