diff --git a/searches/simple_binary_search.py b/searches/simple_binary_search.py index 8495dda8d..d1f7f7a51 100644 --- a/searches/simple_binary_search.py +++ b/searches/simple_binary_search.py @@ -31,8 +31,14 @@ def binary_search(a_list: list[int], item: int) -> bool: False >>> print(binary_search([], 1)) False - >>> print(binary_search([.1, .4 , -.1], .1)) + >>> print(binary_search([-.1, .1 , .8], .1)) True + >>> binary_search(range(-5000, 5000, 10), 80) + True + >>> binary_search(range(-5000, 5000, 10), 1255) + False + >>> binary_search(range(0, 10000, 5), 2) + False """ if len(a_list) == 0: return False