Lines Matching refs:lo
3 def insort_right(a, x, lo=0, hi=None): argument
12 if lo < 0:
16 while lo < hi:
17 mid = (lo+hi)//2
19 else: lo = mid+1
20 a.insert(lo, x)
24 def bisect_right(a, x, lo=0, hi=None): argument
35 if lo < 0:
39 while lo < hi:
40 mid = (lo+hi)//2
42 else: lo = mid+1
43 return lo
47 def insort_left(a, x, lo=0, hi=None): argument
56 if lo < 0:
60 while lo < hi:
61 mid = (lo+hi)//2
62 if a[mid] < x: lo = mid+1
64 a.insert(lo, x)
67 def bisect_left(a, x, lo=0, hi=None): argument
78 if lo < 0:
82 while lo < hi:
83 mid = (lo+hi)//2
84 if a[mid] < x: lo = mid+1
86 return lo