by jgross206 · 13y ago · 0 comments
An algorithm is O(log n) if you can reduce the solution space (the set of all possible solutions) by a fraction (e.g. divide it in half or divide it into tenths) using a constant number of operations.
For example, binary search is O(log n) because you can cut the solution space in half (regardless of how big it is) by using a constant number of operations.
No comments yet.