Algorithms
(Revisit the big “O”)
UKZN
ENEL2DSH2
2016
,Recall!
Big Oh notation
f(n) = O( g(n) ) : “f of n is big oh of g of n” if and only if there exists
positive constants c and m such that f(n) <= c x g(n) for all n >= m
Example:
Function 3n + 2 = O(n)
Reason
3n + 2 <= 4n for all n >= 2
, Complexity of algorithm
• Note that advanced studies on big “O” and other related topics on
complexity will be covered again in 4th year
Recommended: Take module ENEL4AA H1