LearnReally
by learnreallyin EnglishCurated

Available inEnglishFrenchGermanHindiPortugueseRussianSpanish

Big-O and Data Structures for Interviews

Learn Big-O notation from zero and the time and space cost of the core data structures, searches and sorts. For coding interviews and computer science courses, from simple loops to hash maps, trees and graphs.

220cards4imports
Try it first
Contents

Card 1 of 220

What does Big-O notation describe?

How an algorithm's cost grows as its input grows

Source

Big-O names the shape of growth, not a time: O(n) means the work rises in step with the input, O(n²) with its square. The curves show how differently those shapes climb once the input gets large. Strictly, Big-O states an upper bound on that growth. The O stands for Ordnung, German for order: the notation comes from Paul Bachmann (1894) and was spread by Edmund Landau.