美文网首页
2019-02-11 Basic Algorithms Lec5

2019-02-11 Basic Algorithms Lec5

作者: ANPULI | 来源:发表于2019-02-12 01:19 被阅读0次

Talked about the big-\theta notation.
Some logarithms, e.g., log_2{n}=\theta (log_2{n^2})

Complexities

  • worst case
  • best case
  • average
  • space complexity
  • IO complexity
function Search(x, A[1,..n])
    for i from 1 to n
        if A[i] = x then return True
    return False

Worst Case
f(n)=\theta({n})
Best Case
\theta(1)

相关文章

网友评论

      本文标题:2019-02-11 Basic Algorithms Lec5

      本文链接:https://www.haomeiwen.com/subject/pstheqtx.html