OnlineWoerterBuecher.de
Internes

Lexikon


binary search


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 = (first+last)/2 /* truncate to integer */ if (target == thing[mid]) return mid if (target < thing[mid]) last = mid-1 else first = mid+1 } if (target == thing[last]) return last return NOT_FOUND (2003-01-14)

In addition suitable contents:
[ 2 ] [ = ] [ al ] [ algorithm ] [ am ] [ an ] [ ar ] [ arc ] [ arg ] [ as ] [ at ] [ b ] [ bi ] [ binary ] [ C ] [ ca ] [ cat ] [ cc ] [ ch ] [ co ] [ com ] [ D ] [ dd ] [ de ] [ ding ] [ do ] [ du ] [ ec ] [ ed ] [ eg ] [ element ] [ er ] [ es ] [ et ] [ fi ] [ file ] [ fo ] [ for ] [ forms ] [ ge ] [ h ] [ hing ] [ hm ] [ hr ] [ id ] [ il ] [ in ] [ index ] [ int ] [ integer ] [ ir ] [ it ] [ ke ] [ key ] [ la ] [ Lex ] [ ls ] [ lu ] [ ly ] [ mo ] [ mod ] [ module ] [ mp ] [ ms ] [ N ] [ na ] [ nc ] [ ND ] [ ne ] [ ng ] [ NOT ] [ O ] [ om ] [ OT ] [ pa ] [ pe ] [ perf ] [ ph ] [ pseudo ] [ query ] [ rc ] [ re ] [ repeat ] [ ro ] [ routine ] [ ru ] [ run ] [ se ] [ space ] [ st ] [ T ] [ ] [ tar ] [ target ] [ th ] [ to ] [ tr ] [ ua ] [ va ] [ value ] [ ve ] [ vector ] [ vi ] [ while ] [ win ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (4703 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0956 Seconds, with 17 Database-Queries
Zurück zur Startseite