Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 536 Bytes

algorithm-big-o.md

File metadata and controls

17 lines (12 loc) · 536 Bytes

Big O

  • ways of counting an algorithm
  • language for talking about functions

Bounds

  • big o vs big omega vs big theta
  • bounds are only valid greater than some initial value n0 (kind of like a steady-state signal)
  • O (n) is actually the upper bound on f
  • Omega (n) is the lower bound
  • Theta (n) is upper and lower bounded - this is the one we use, but we drop the middle cross of theta
  • upper bound is not worst case

Recursive functions

  • for recursive functions with multiple calls, often runtime is O(branches^depth)