A beginner's guide to Big-O notation and Time Complexity
Big O notation is used in Computer Science to describe the performance or complexity of an algorithm. Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm.
How to measure Time Complexity using algorithm?
Algorithm: Add Sugar to Lime Soda
1.Fetch the bowl containing the sugar.
2.Get a spoon.
3.Scoop out sugar using a spoon.
4.Pour the sugar from the spoon into a soda.
5.Repeat steps 3 and 4 to add more sugar.
This algorithms represents Linear Time Complexity for more understanding follow below video:
Below are the terms explained of Big-O Notations by cmglee:
Big-O Explained in Below Video
This article only covers the very basics or Big O and logarithms. For a more in-depth explanation take a look at their respective Wikipedia entries: Big O Notation, Logarithms. #Fundootesters