What Is Big O Notation and Why Software Engineers Must Know This Concept for Their Next Tech Interview

Tomasz Dobrowolski
7 min readAug 25, 2022

As a Software Engineer, you are guaranteed to get a question about Big O Notation in a tech interview.

But what is Big O Notation? And why do you need to know about it?

What is Big O Notation?

Big O notation is a way to define how an algorithm grows in size as the input size grows.

The notation involves using a label (known as a growth hierarchy), to rank how efficient the algorithm is in time and space.

That sounds complex so I will break this down into a real-life example.

Let’s use a restaurant as an example

John and Max are meeting for dinner on Friday evening, the busiest time of the week for restaurants.

They both need to be finished within ninety minutes and are deciding between two restaurants.

But how will they decide which one is the fastest option? and how can they be sure the restaurant will not take too long during the busiest time of the week?

If we compare the technical definition of Big O. In this example, the restaurant is the algorithm, and the input is the number of customers.

--

--

Tomasz Dobrowolski

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