What is the difference between Θ(n) and O(n)?

后端 未结 9 1188

Sometimes I see Θ(n) with the strange Θ symbol with something in the middle of it, and sometimes just O(n). Is it just laziness of typing because nobody knows how to type th

9条回答
  •  死守一世寂寞
    2020-11-22 04:51

    one is Big "O"

    one is Big Theta

    http://en.wikipedia.org/wiki/Big_O_notation

    Big O means your algorithm will execute in no more steps than in given expression(n^2)

    Big Omega means your algorithm will execute in no fewer steps than in the given expression(n^2)

    When both condition are true for the same expression, you can use the big theta notation....

提交回复
热议问题