Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/99409d217fee08fc498fb2e10456b26b to your computer and use it in GitHub Desktop.
Save parzibyte/99409d217fee08fc498fb2e10456b26b to your computer and use it in GitHub Desktop.
// Probar algoritmo
const arreglo = [1, 2, 5, 8, 10, 11, 11, 16, 20, 80, 500, 500, 1000, 1002, 5000],
busqueda = 80;
const indice = busquedaBinariaRecursiva(arreglo, busqueda, 0, arreglo.length - 1);
console.log("El valor %s está en el índice %d", busqueda, indice);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment