Computer Science
Intermediate

Logarithmic Time

Runtime that grows logarithmically with input size.

Formula

O(logn)O(\log n)

Variables

nInput size

Example

Binary search

Did You Know?

Logarithmic time means a billion items take only about 30 steps, the magic behind binary search.