Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Probar con arreglo numérico
- """
- arreglo = [1, 2, 3, 10, 50, 80, 120, 150, 500, 1000]
- print("Vamos a buscar en la siguiente lista:", arreglo)
- busqueda = 500
- indice = busqueda_binaria_recursiva(arreglo, busqueda, 0, len(arreglo) - 1)
- print("El elemento {} está en el índice {}".format(busqueda, indice))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement