Logarithmic time complexity
An algorithmic running-time growth rate proportional to the logarithm of the input size, commonly expressed as O(log n).
Advanced Algorithms and Data Structures
Logarithmic time is a running-time bound that grows proportionally to the logarithm of the input size or another stated size parameter.
- How it is used
- Guides data-structure selection when partial ordering, heap operations, or balanced-tree access should scale beyond linear scans.
- How deep it goes
- Explains height and comparison bounds, worst-case versus amortized guarantees, logarithm bases, and practical constant-factor trade-offs.
- Examples
- Uses task-priority insertion, binary-heap comparisons, cache performance tables, and balanced k-d-tree construction.
- What you can do after
- Evaluate data structures by separating asymptotic growth, balance assumptions, worst-case guarantees, amortization, and implementation constants.
Read how Advanced Algorithms and Data Structures explains logarithmic time complexity →
Grokking Algorithms, Second Edition
Logarithmic time describes an algorithmic running time that grows in proportion to the logarithm of the input size.
- How it is used
- Compares algorithm growth rates and highlights why binary search scales better than simple search.
- How deep it goes
- Explains logarithmic growth through examples and comparisons, while simplifying operation counts and deferring fuller Big O treatment.
- Examples
- Uses binary-search guesses, folded grids, operation counts, and quicksort call stacks as concrete examples.
- What you can do after
- Evaluate whether an algorithm grows logarithmically and compare its scaling with linear and other common runtimes.
Read how Grokking Algorithms, Second Edition explains logarithmic time complexity →
Learn C++ by Example
Logarithmic complexity is an algorithmic growth rate proportional to the logarithm of the number of input elements, commonly expressed as O(log(n)).
- How it is used
- Explains why ordered associative containers keep searches, insertions, and removals efficient.
- How deep it goes
- Explains branch-by-branch search, doubling behavior, and tree balancing, but does not derive logarithms mathematically.
- Examples
- Uses a three-node search path and contrasts map lookup with worst-case vector scanning.
- What you can do after
- Evaluate data-structure choices by comparing logarithmic map operations with linear vector searches.
Read how Learn C++ by Example explains logarithmic time complexity →
Latency
Logarithmic time is an algorithmic growth class in which required operations increase proportionally to the logarithm of input size.
- How it is used
- Compares algorithmic growth to guide work elimination and low-latency optimization.
- How deep it goes
- Defines growth behavior and trade-offs, then shows data-structure cases without deriving logarithmic operations internally.
- Examples
- Uses a complexity-growth figure and binary search tree operation table to compare logarithmic, linear, quadratic, and constant growth.
- What you can do after
- Evaluate algorithm choices by comparing asymptotic growth with input size, execution frequency, and absolute latency.
Related concepts
- linear time complexitycontrasts with · Linear time complexity is an asymptotic running-time growth rate proportional to input size, or to the combined sizes of multiple inputs, up to a constant factor.
- binary searchmeasured by · Binary search is an algorithm that locates a target or boundary in an ordered collection by repeatedly comparing with a midpoint and halving the remaining search range.
- performancemeasured by · Performance is the measurable effectiveness or operational behavior of a system under specified conditions, assessed through relevant qualities such as task results, speed, responsiveness, throughput, or resource use.
- insertmeasures · An insertion is an operation that adds an element, record, or key-value association to a collection or data store, with placement and replacement behavior determined by the target.
- execution context stackmeasures · An execution context stack is a runtime last-in-first-out structure that records active function or method calls and their execution state and return information.
- AVL treemeasures · An AVL tree is a self-balancing binary search tree that maintains bounded differences between subtree heights through rotations.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



