diff --git a/guide/english/algorithms/algorithm-performance/index.md b/guide/english/algorithms/algorithm-performance/index.md index 9404aa0ea1..4c868ba6c4 100644 --- a/guide/english/algorithms/algorithm-performance/index.md +++ b/guide/english/algorithms/algorithm-performance/index.md @@ -43,17 +43,25 @@ The following 3 notations are mostly used to represent time complexity of algori 1. **Θ Notation**: The theta notation bounds a functions from above and below, so it defines exact behavior. we can say that we have theta notation when worst case and best case are the same. >Θ(g(n)) = {f(n): there exist positive constants c1, c2 and n0 such that 0 <= c1*g(n) <= f(n) <= c2*g(n) for all n >= n0} + + 2. **Big O Notation**: The Big O notation defines an upper bound of an algorithm. For example Insertion Sort takes linear time in best case and quadratic time in worst case. We can safely say that the time complexity of Insertion sort is *O*(*n^2*). >O(g(n)) = { f(n): there exist positive constants c and n0 such that 0 <= f(n) <= cg(n) for all n >= n0} + + 3. **Ω Notation**: Ω notation provides an lower bound to algorithm. it shows fastest possible answer for that algorithm. >Ω (g(n)) = {f(n): there exist positive constants c and n0 such that 0 <= cg(n) <= f(n) for all n >= n0}. + + 4. **Little o Notation**: The little o notation defines a strict upper bound of an algorithm. This means that f(n) is less than c * g(n) for all c, but cannot be equal. 5. **ω Notation**: ω (Little Ω) notation provides a strict lower bound to algorithm. This means that f(n) is greater than c * g(n) for all c, but cannot be equal. +*images are from geeksforgeeks + ## Examples As an example, we can examine the time complexity of the [bubble sort] algorithm and express it using big-O notation.