Which of the following are properties of logarithms?
A: logn1 = 0
B: logn(a/b) = logna - lognb
C: logn(1/b ) = - lognb
D: All of the above
A: logn1 = 0
B: logn(a/b) = logna - lognb
C: logn(1/b ) = - lognb
D: All of the above
举一反三
- 长度为n的有序顺序表采用折半查找,查找成功的最少次数为( ),查找成功的最大次数为( ),查找失败的最大次数为( ),所以折半查找的最坏时间复杂度为( ) A: 1,logn,logn,O(logn) B: 1,n,n,O(n) C: 1,n,logn,O(logn) D: 1,logn,n,O(n)
- Which of the following are properties of logarithms?( )
- logn^5 + n^1/2 = O(n^1/2)
- 从n个数里面找最大的两个数理论最少需要比较() A: 2logn B: 2 logn -1 C: n+ logn -2 D: 2n-3
- 下面代码段的时间复杂度是()。 A: O(1) B: O(logn) C: O(n) D: 0(n)