l = 0u = n-1 lоор { mustbe(l, u) } if l>u p= -1 break m = (l + u) /2 case x[m] < t l = m + 1 x[m] == t p = m; break; x[m] > t u = m - 1