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.