In substitution method, simply replace any occurance of T(k) by T(k-1) + k , and do it iteratively. T(n) = T(n-1) + n = = (T(n-2) + (n-1)) + ...
確定! 回上一頁