Position BinarySearch( List L, ElementType X ){
int head=1,end=L->Last,mid;
while(head<=end){
mid=(head+end)/2;
if(L->Data[mid]==X){
return mid;
}
else if(L->Data[mid]>X){
end=mid-1;
}
else{
head=mid+1;
}
}
return NotFound;
}
01-16
1086