Const int not found = -1;
Int Binsearch (Const Vector & Vec, Int Val)
{
INT low = 0;
INT high = vec.size () -1;
While (low <= high)
{
INT MID (Low High) / 2;
IF (VAL == VEC [MID])
Return MID;
IF (Val
HIGH = MID - 1;
Else
Low = MID 1;
}
Return NOTFOUND;
}