Finding Big O Notation

Post by Souleymane Dembele on Mar 07, 2021

What is Big O?

In computer science or in Math, the Big O Notation is a method used to analyze(measure) the efficiency of an algorithm given an input size n. Big O notation answers the question of what will happen when an input size n approches Infinity โˆž\infty. For example, assume the function f(x)=5x2+2x+4f(x) = 5x^2 + 2x + 4; The limit when xx approches to Infinity โˆž\infty of f(x)f(x) equal the limit when xx approches to Infinity โˆž\infty of 5x2 + 2x + 4 which is equal Infinity โˆž\infty.

Why Big O Matter?

Big O notation helps us measure the worse case senario of the performence of an algorithm. In fact, it can be used to analyze both space and time complexity of an algorithm.

Sn=n(2a+(nโˆ’1)d)2S_n = \frac{n(2a + (n-1)d)}{2}

time complexity