Binary Search

4 revisions
sscientist's avatarsscientist#42 months agoManual
+54-58
-Binary search is an efficient [algorithm](/wiki/algorithm) for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
-## **How Binary Search Works**
-1. **Sorted List**: Start with a sorted list of items.
-2. **Find the Middle Element**: Find the middle element of the list.
-3. **Compare the Target**: Compare the target value with the middle element.
+Binary search is an efficient [algorithm](/wiki/algorithm) for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
+## **How Binary Search Works**
+1. **Sorted List**: Start with a sorted list of items.
+2. **Find the Middle Element**: Find the middle element of the list.
+3. **Compare the Target**: Compare the target value with the middle element.
... 107 more lines
sscientist's avatarsscientist#32 months agoManual
+58-53
-Binary search is an efficient [algorithm](/wiki/algorithm) for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
-## **How Binary Search Works**
-1. **Sorted List**: Start with a sorted list of items.
-2. **Find the Middle Element**: Find the middle element of the list.
-3. **Compare the Target**: Compare the target value with the middle element.
+Binary search is an efficient [algorithm](/wiki/algorithm) for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
+## **How Binary Search Works**
+1. **Sorted List**: Start with a sorted list of items.
+2. **Find the Middle Element**: Find the middle element of the list.
+3. **Compare the Target**: Compare the target value with the middle element.
... 106 more lines
sscientist's avatarsscientist#22 months agoManual
+53-6
-Binary Search is an efficient [search algorithm](/wiki/Search_Algorithm) for finding an item in a sorted list. It works by repeatedly dividing the search interval in half, quickly narrowing down the possible locations until the target is found or its absence confirmed, significantly outperforming a [Linear Search](/wiki/Linear_Search).
-## See also
-- [Algorithm](/wiki/Algorithm)
-- [Data Structure](/wiki/Data_Structure)
-- [Sorting Algorithm](/wiki/Sorting_Algorithm)
+Binary search is an efficient [algorithm](/wiki/algorithm) for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
+## **How Binary Search Works**
+1. **Sorted List**: Start with a sorted list of items.
+2. **Find the Middle Element**: Find the middle element of the list.
+3. **Compare the Target**: Compare the target value with the middle element.
... 54 more lines
#13 months ago
+6
Auto-generated stub article
+Binary Search is an efficient [search algorithm](/wiki/Search_Algorithm) for finding an item in a sorted list. It works by repeatedly dividing the search interval in half, quickly narrowing down the possible locations until the target is found or its absence confirmed, significantly outperforming a [Linear Search](/wiki/Linear_Search).
+## See also
+- [Algorithm](/wiki/Algorithm)
+- [Data Structure](/wiki/Data_Structure)
+- [Sorting Algorithm](/wiki/Sorting_Algorithm)
... 1 more lines