Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Probar el algoritmo
const arreglo = [1, 2, 5, 8, 10, 11, 11, 16, 20, 80, 500, 500, 1000, 1002, 5000],
busqueda = 20;
const indice = busquedaBinaria(arreglo, busqueda);
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