Hyper Dictionary

English Dictionary Computer Dictionary Thesaurus Dream Dictionary Medical Dictionary


Search Dictionary:  

Meaning of BINARY SEARCH

Computing Dictionary
 
 Definition: 

A search algorithm which repeatedly divides an ordered search space in half according to how the required (key) value compares with the middle element.

The following pseudo-C routine performs a binary search return the index of the element of vector "thing[first..last]" equal to "target":

 if (target < thing[first] || target > thing[last])
   return NOT_FOUND;
 while (first < last)
 

mid =

if (target == thing[last]) return last; return NOT_FOUND;

 
 Websites: 
 

 

COPYRIGHT © 2000-2003 WEBNOX CORP. HOME | ABOUT HYPERDICTIONARY