O(log n) 与 O(log 2n) 相同吗?
最佳答案
作者:laws of logarithms , log(2N) = log(2) + log(N)
因为你是用大 O 写的,所以你得到的是 O(log(2)) + O(log (N)) = O(log(N)
.
关于time-complexity - 时间复杂度: O(log n) versus O(log 2n),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66906358/