Skip to content
Prev Previous commit
trailing whitespace jump search
  • Loading branch information
grochedix committed Sep 11, 2020
commit 25259cccf8250b9ef82349f2799743402742f3e0
2 changes: 1 addition & 1 deletion searches/jump_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def jump_search(arr: list, x: int) -> int:
arr = [int(item) for item in user_input.split(",")]
x = int(input("Enter the number to be searched:\n"))
res = jump_search(arr, x)
if res == -1:
if res == -1:
print("Number not found!")
else:
print(f"Number {x} is at index {res}")