O(N/2) 是否简化为 O(log n)?

Does O(N/2) simplifies to O(log n)?

我有一种算法只需要在 O(N/2) 时间内 运行 (基本上它是一个 for 循环,只需要 运行 超过一半的元素)。

这在大 O 表示法中如何简化? O(log n)?

大 O 符号删除了因子。 O(N/2) = O(1/2 * N) 并简化为 O(N).

如果您想知道为什么该因子被删除,我建议您参考 this other SO question