File:Binary_Search_Depiction.svg · Wikimedia Commons · See Wikimedia Commons
二分查找
Sign in to saveAlso known as half-interval search, logarithmic search, binary chop
有序列表的搜索算法,每次搜索过程将范围缩小一半
AI overview
Binary search is a method for finding a specific item in a sorted list by repeatedly dividing the search area in half, eliminating half of the remaining possibilities with each step. It matters because this approach is much faster than checking every item one by one, especially when dealing with large lists.
AI-generated from the Wikipedia summary — may contain errors.
Key facts
- Class
- Search algorithm
- Data structure
- Array
- Worst case performance
- O (log n )
- Best case performance
- O (1)
- Average performance
- O (log n )
- Worst case space complexity
- O (1)
- Optimal
- Yes
via Wikipedia infobox
Wikidata facts
- Instance of
- divide-and-conquer algorithm
- Image
- Binary Search Depiction.svg
Show 5 more facts
- Stack Exchange tag
- stackoverflow.com/tags/binary-search
- Commons category
- Binary search algorithm
- maintained by WikiProject
- WikiProject Mathematics
- P13411
- World Brain
Sources (3)
via Wikidata · CC0