There was an error while loading. Please reload this page.
1 parent a4c1df1 commit 9ea9f2cCopy full SHA for 9ea9f2c
1 file changed
searches/linear_search.py
@@ -55,7 +55,7 @@ def rec_linear_search(sequence: list, low: int, high: int, target: int) -> int:
55
-1
56
"""
57
if not (0 <= high < len(sequence) and 0 <= low < len(sequence)):
58
- raise Exception("Invalid upper or lower bound!")
+ raise ValueError("Invalid upper or lower bound!")
59
if high < low:
60
return -1
61
if sequence[low] == target:
0 commit comments