Binary search
binary search
algorithm
a search algorithm which repeatedly divides an ordered search sp-ce 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[last]) return not_found; while (first mid = (first+last)/2; /- truncate to integer -/ if (target == thing[mid]) return mid; if (target if (target == thing[last]) return last; return not_found;
(2003-01-14)
Read Also:
- Binary synchronous transmission
binary synchronous transmission protocol (bisynch) an ibm link protocol, developed in the 1960 and popular in the 1970s and 1980s. binary synchronous transmission has been largely replaced in ibm environments with sdlc. bisync was developed for batch communications between a system 360 computer and the ibm 2780 and 3780 remote job entry (rje) terminals. it […]
- Binary tree
binary tree
- Binary weapon
noun a chemical weapon consisting of a projectile containing two substances separately that mix to produce a lethal agent when the projectile is fired
- Binasal hemianopsia
binasal hemianopsia
- Binate
produced or borne in pairs; double. historical examples a handbook of some south indian gr-sses rai bahadur k. ranga achariyar a handbook of some south indian gr-sses rai bahadur k. ranga achariyar a handbook of some south indian gr-sses rai bahadur k. ranga achariyar adjective (botany) occurring in two parts or in pairs: binate leaves […]