Big O Notation — How to Identify N Log N, Quadratic, and Cubic Algorithms

Tomasz Dobrowolski
9 min readSep 7, 2022
Photo by Kevin Ku on Unsplash

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

If you are not aware of what Big O Notation is, check out the first article from the Big O Notation series — ‘What is Big O Notation?’

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.

--

--

Tomasz Dobrowolski

I break down Software Engineering and Tech concepts | Backend Engineer 🐘