Get the latest tech news

A visual introduction to big O notation


Big O notation is a way of describing the performance of a function without using time. Rather than timing a function from start to finish, big O describes how the time grows as the input size increases.

Because it's common for an algorithm's performance to depend not just on the size of the input, but also its arrangement, big O notation always describes the worst-case scenario. We can improve the time complexity of the code we write by making better algorithmic choices and avoiding common pitfalls. These posts take me a long time to write, and they wouldn't be possible without the support of my family, friends, sponsors, and reviewers.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of big O notation

big O notation

Photo of visual introduction

visual introduction