只要预先设定一个常系数c,能够确定上界就可。
Two properties of the Big-O notation:
(1) O(f(n))=O(c∙f(n)) for any constant c>0.
(2)O(n^a+n^b)=O(n^a) for any constant a>b>0.
时间复杂度可以看成次数,==T(n)经过多少次变成T(1).
只要预先设定一个常系数c,能够确定上界就可。
Two properties of the Big-O notation:
(1) O(f(n))=O(c∙f(n)) for any constant c>0.
(2)O(n^a+n^b)=O(n^a) for any constant a>b>0.
时间复杂度可以看成次数,==T(n)经过多少次变成T(1).