Update Searches/jump_search.rb

This commit is contained in:
Vitor Oliveira 2021-02-06 22:48:31 -08:00 committed by GitHub
parent 2c1b0d9f77
commit c3b26bed0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,6 @@ arr = gets.chomp.split(' ').map(&:to_i)
puts "Enter the value to be searched:"
value = gets.chomp.to_i
index = jumpsearch(arr, value)
index = jump_search(arr, value)
puts index == -1 ? "Element not found" : "Number #{value} is at #{index}"