Lines Matching full:mid
57 mid = (lo + hi) // 2
58 if v > ls[mid]:
59 # Inserting v anywhere below mid would result in an unsorted list
60 # because it's > the value at mid. Therefore mid is a valid new lo
61 lo = mid
64 # elif v == ls[mid]:
65 # return mid
67 # Either v == ls[mid] in which case mid is a valid insertion point
68 # or v < ls[mid], in which case all valid insertion points must be
69 # < hi. Either way, mid is a valid new hi.
70 hi = mid