Algorithm For Binary Search In Python