ProLesson 3 of 37 min read

Big-O notation: describing how an algorithm grows

Understand what Big-O notation means, how to read common complexities like O(n) and O(n log n), and how to estimate them from code.

Two programs can both give the right answer, yet one finishes instantly and the other takes hours once the data gets big. Timing them on your laptop does not tell the whole story, because results depend on the machine and the input. Big-O notation gives programmers a shared way to describe how the work an algorithm does grows as the input size grows.

Vidi Pro

Keep going with Pro.

The first lesson of every class is free. Pro opens every lesson in IELTS, Programming, Mathematics, Science and Data and AI, with practice questions.

Already have Pro? Log in to keep reading.

Written with AI help. Spotted a mistake? Tell us.