@@ -0,0 +1,657 @@
+# https://interactivepython.org/runestone/static/pythonds/SortSearch/TheBinarySearch.html#analysis-of-binary-search%0A%0A%0Adef binsearch(L, target, start, end):%0A    if start %3E end:%0A        return -1%0A%0A    mid = (start + end) // 2%0A    if L%5Bmid%5D == target:%0A        return mid%0A    elif L%5Bmid%5D %3C target:%0A        return binsearch(L, target, mid+1, end)%0A    elif target %3C L%5Bmid%5D:%0A        return binsearch(L, target, start, mid-1)%0A%0A%0Adef search(L, target):%0A    n = len(L)%0A    return binsearch(L, target, 0, n)%0A%0A%0Aif '__main__' == __name__:%0A    L = %5B0, 1, 3, 5, 6, 7, 10, 13, 39%5D%0A    print search(L, 0)%0A    print search(L, 2)%0A    print search(L, 5)%0A    print search(L, 39)%0A

add binsearch recursive