slovodefinícia
binary search
(foldoc)
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)
podobné slovodefinícia

Nenašli ste slovo čo ste hľadali ? Doplňte ho do slovníka.

na vytvorenie tejto webstránky bol pužitý dictd server s dátami z sk-spell.sk.cx a z iných voľne dostupných dictd databáz. Ak máte klienta na dictd protokol (napríklad kdict), použite zdroj slovnik.iz.sk a port 2628.

online slovník, sk-spell - slovníkové dáta, IZ Bratislava, Malé Karpaty - turistika, Michal Páleník, správy, údaje o okresoch V4