diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-10-08 12:29:10 +0000 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-10-08 12:29:10 +0000 |
commit | 71d24d186871d3a76acdf13c7ad194fbc6613bf9 (patch) | |
tree | d267d7635bb5b917beb9e6c17bdb1feb1c401da7 | |
parent | 2c53f7b157233bd82023b1280ade5017eb243f77 (diff) | |
download | cs-y13-71d24d186871d3a76acdf13c7ad194fbc6613bf9.tar.gz cs-y13-71d24d186871d3a76acdf13c7ad194fbc6613bf9.tar.bz2 cs-y13-71d24d186871d3a76acdf13c7ad194fbc6613bf9.zip |
feat: not workin
-rw-r--r-- | lesson1.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -12,12 +12,9 @@ def binsearch(arr: list, item): while not found and lbound <= ubound: index = (lbound + ubound) // 2 if lbound == ubound: - if arr[lbound] == item: + if arr[index] == item: found = True print("Found here") - break - else: - break if arr[index] > item: ubound = index - 1 if arr[index] < item: |