๐Ÿ“˜

Complexity

How much work (or memory) an algorithm needs as its input grows.

๐Ÿ˜Š In simple words

How much work (or memory) an algorithm needs as its input grows.

๐ŸŽ“ Technical definition

A measure of the time or space an algorithm uses as a function of input size n, usually expressed with Big O notation.

Pseudocode example
1FOR I = 1 TO N          // about N steps: O(n)2    DISPLAY I3END FOR

๐ŸŽ Real-world analogy

Reading every page of a book vs jumping straight to the index.

๐Ÿ”— Related concepts

โ† Whole glossary