From 471e6d0791167756d0a7f35a2a197e235bca73f7 Mon Sep 17 00:00:00 2001 From: Enzo Date: Sat, 13 Jul 2024 15:27:09 -0400 Subject: [PATCH] Add es-ES translation to search/binary-search (#893) --- .../search/binary-search/README.es-ES.md | 27 +++++++++++++++++++ src/algorithms/search/binary-search/README.md | 17 ++++++------ .../search/binary-search/README.pt-BR.md | 1 + 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 src/algorithms/search/binary-search/README.es-ES.md diff --git a/src/algorithms/search/binary-search/README.es-ES.md b/src/algorithms/search/binary-search/README.es-ES.md new file mode 100644 index 00000000..f14aef98 --- /dev/null +++ b/src/algorithms/search/binary-search/README.es-ES.md @@ -0,0 +1,27 @@ +# Búsqueda binaria + +_Lea esto en otros idiomas:_ +[English](README.md) +[Português brasileiro](README.pt-BR.md). + +En informática, la búsqueda binaria, también conocida como búsqueda de medio intervalo +búsqueda, búsqueda logarítmica, o corte binario, es un algoritmo de búsqueda +que encuentra la posición de un valor objetivo dentro de una matriz +ordenada. La búsqueda binaria compara el valor objetivo con el elemento central +de la matriz; si son desiguales, se elimina la mitad en la que +la mitad en la que no puede estar el objetivo se elimina y la búsqueda continúa +en la mitad restante hasta que tenga éxito. Si la búsqueda +termina con la mitad restante vacía, el objetivo no está +en la matriz. + +![Búsqueda binaria](https://upload.wikimedia.org/wikipedia/commons/8/83/Binary_Search_Depiction.svg) + +## Complejidad + +**Complejidad de tiempo**: `O(log(n))` - ya que dividimos el área de búsqueda en dos para cada +siguiente iteración. + +## Referencias + +- [Wikipedia](https://en.wikipedia.org/wiki/Binary_search_algorithm) +- [YouTube](https://www.youtube.com/watch?v=P3YID7liBug&index=29&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) diff --git a/src/algorithms/search/binary-search/README.md b/src/algorithms/search/binary-search/README.md index ebf3e123..34d1bd7a 100644 --- a/src/algorithms/search/binary-search/README.md +++ b/src/algorithms/search/binary-search/README.md @@ -2,15 +2,16 @@ _Read this in other languages:_ [Português brasileiro](README.pt-BR.md). +[Español](README.es-ES.md). -In computer science, binary search, also known as half-interval -search, logarithmic search, or binary chop, is a search algorithm -that finds the position of a target value within a sorted -array. Binary search compares the target value to the middle -element of the array; if they are unequal, the half in which -the target cannot lie is eliminated and the search continues -on the remaining half until it is successful. If the search -ends with the remaining half being empty, the target is not +In computer science, binary search, also known as half-interval +search, logarithmic search, or binary chop, is a search algorithm +that finds the position of a target value within a sorted +array. Binary search compares the target value to the middle +element of the array; if they are unequal, the half in which +the target cannot lie is eliminated and the search continues +on the remaining half until it is successful. If the search +ends with the remaining half being empty, the target is not in the array. ![Binary Search](https://upload.wikimedia.org/wikipedia/commons/8/83/Binary_Search_Depiction.svg) diff --git a/src/algorithms/search/binary-search/README.pt-BR.md b/src/algorithms/search/binary-search/README.pt-BR.md index 14445a04..4f9de9f1 100644 --- a/src/algorithms/search/binary-search/README.pt-BR.md +++ b/src/algorithms/search/binary-search/README.pt-BR.md @@ -2,6 +2,7 @@ _Leia isso em outras línguas:_ [english](README.md). +[Español](README.es-ES.md). Em ciência da computação, busca binária, também conhecida como busca de meio-intervalo, busca logarítmica ou corte binário, é um algoritmo de pesquisa que encontra a posição de um elemento alvo dentro de um