Created
August 7, 2019 17:28
-
-
Save parzibyte/1fb51ddadc72ff42721d8432f4b0a82a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arreglo = ["auto", "avispa", "avión", "computadora", "gato", "perro", "tarjeta"]; | |
$busqueda = "computadora"; | |
$izquierda = 0; | |
$derecha = count($arreglo) - 1; | |
$indice = busquedaBinariaRecursiva($arreglo, $busqueda, $izquierda, $derecha); | |
echo "El elemento $busqueda está en el índice $indice"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment