How to understand this type of question, I know about big-O, big-omega and big-theta but can you explain with the example.
PS: 1. Big-o- It defines the upper bound of an algorithm or in layman terms we can say that for calculating the worst case, we use big-oh.
DEFN: f(n)<= cg(n) where c is constant and greater than 0. for example: for some algorithm if it's worst case is O(n) then O(n^2) will also it's upper bound but we're only interested in tightest upper bound.Right?
- Big-omega- It defines the lower bound or best case of an algo. DEFN: f(n)>=cg(n)
similarly for Big-theta i.e average case of an algo.
