Showing posts with label Algorithms. Show all posts
Showing posts with label Algorithms. Show all posts

Jun 3, 2020

快速幂


要求 , 其中 , . 先不妨假设 , 基本想法是
很容易写出时间复杂度 的递归算法, 而要写迭代算法需要再想一想.

Jan 15, 2020

主定理的证明

算法分析的那个定理.
Master Theorem
where , are constants and is nonnegative. Then
  1. If for some constant , then .
  2. If , then .
  3. If for some constant , and if for some constant and all sufficiently large , then .