Tag

logarithmic complexity

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 29, 2024 · Fundamentals

Binary Search: Fundamentals, Common Implementations, and Applications

Binary search is an efficient O(log n) algorithm for locating elements in sorted arrays or intervals, and this article explains its basic principles, recursive and iterative implementations, handling of edge cases, applications such as log file indexing, and extensions to rotated arrays and variable‑length data.

AlgorithmSearchbinary search
0 likes · 18 min read
Binary Search: Fundamentals, Common Implementations, and Applications