BigO

BigO

Big O(oh) notation is used to describe the efficiency of an algorithm or function. Big O’s role in algorithm efficiency is to describe the Worst Case of efficiency an algorithm can have in performing it’s job. This efficiency is evaluated based on time complexity (The amount of time a function needs to complete.) and space complexity (The amount of memory resources a function uses to store data and instructions.)

In order to analyze these limiting factors, we should consider 4 Key Areas for analysis:


Input Size

Input Size refers to the size of the parameter values that are read by the algorithm. We will use the letter n to refer to the Input Size value.


Units of Measurement

In order to quantify the Running Time in our analysis, we will consider Three Measurements of time:

In order to quantify Memory Space, we can consider Four Sources of Memory Usage during function run-time:


Orders of Growth

Order of Growth represents the increase in Running Time or Memory Space.

BigO graph


Worst Case, Best Case, Average Case

Even though Big O describes the Worst Case for algorithm efficiency, we can still think about Best and Average cases.


Asymptotic Notations




Read more