Interview Preparation Big O notation
From Embedded Systems Learning Academy
Revision as of 01:48, 19 December 2016 by Proj user18 (talk | contribs)
Big O notation is a mathematical way of representing an approximate time required for an expression to complete by checking for its major dependencies.
For a example, f(n) = n^5 + n.
As we go on increasing the value of n the dependency on the second half equation on the right-hand side will reduce.
so, we can also say that f(n) = n^5 or complexity is O(n^5) for n equal to infinity.
Note: For comparison of big O complexity for different algorithms, refer following site: http://bigocheatsheet.com/