gpt4 book ai didi

big-o - 试图理解大 oh 符号

转载 作者:行者123 更新时间:2023-12-01 10:10:06 26 4
gpt4 key购买 nike

您好,如果您能在大 O 表示法方面提供帮助,我将不胜感激。我明天要考试,虽然我可以定义 f(x) 是 O(g(x)) 是什么,但我不能说我完全理解它。

下面的问题总是在考试中出现,我真的需要尝试弄清楚,第一部分看起来很简单(我认为)你只是为 n 选择一个值,将它们全部计算在计算器上并将它们放在为了?这似乎很容易,所以我不确定。我发现很难在线找到示例。

From lowest to highest, what is thecorrect order of the complexitiesO(n2), O(log2 n), O(1), O(2n), O(n!),O(n log2 n)?

What is theworst-case computational-complexity ofthe Binary Search algorithm on anordered list of length n = 2k?

最佳答案

That guy should help you .

From lowest to highest, what is the correct order of the complexities O(n2), O(log2 n), O(1), O(2n), O(n!), O(n log2 n)?

顺序与在无穷大处比较它们的极限相同。像lim(a/b),如果是1,那么它们是一样的,inf。或 0 表示其中一个更快。

What is the worst-case computational-complexity of the Binary Search algorithm on an ordered list of length n = 2k?

  1. 找到二分搜索最好/最差的 Big-O。
  2. 按索引 best/worst Big-O 查找链表访问。
  3. 得出结论。

关于big-o - 试图理解大 oh 符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5967354/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com