# What is BIG(O) NOTATION

October 8, 2012 Leave a comment

BIG O Notation is used to represent complexity of an algorithm in worst case scenario.

Complexity in computer programming can be defined in terms of time and space. Space complexity tells us how much space is going to be taken for a particular algorithm. Time complexity tells us number of iterations (indirectly time) that are required for the completion of an algorithm.

O(1) means It takes constant space/time irrespective of the size of the data structure

O(n) means the space/time complexity is proportional to the length of the data structure

## Recent Comments