Big O Notation — How to Identify N Log N, Quadratic, and Cubic Algorithms
Misunderstanding Big O Notation can hurt how your systems scale.
Algorithms that increase in operation at a larger rate than linear algorithms are inefficient. This can result in systems that scale at a costly rate.
As a Software Engineer, it is vital you can identify all of the inefficient notations, and this article will cover the first three: N Log N, Quadratic and Cubic notation.
Big O Notation — How algorithms grow in complexity as the input grows in size
The Wikipedia definition of Big O Notation is — ‘In computer science, big O notation is used to classify algorithms according to how their run time or space requirements grow as the input size grows.’
To classify these algorithms we use a growth hierarchy which is ranked in order of efficiency. A good analogy is the energy efficiency rating. Where A is the most efficient rating, and as you move down the alphabet, the lower the efficiency.