From d1fce22a89166f010827e3045827d76b13e9fc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Jos=C3=A9=20Haro?= Date: Tue, 27 Dec 2022 18:56:09 -0300 Subject: [PATCH] Add Spanish translation --- .../sorting/selection-sort/README.es-MX.md | 20 +++++++++++++++++++ .../sorting/selection-sort/README.md | 2 +- .../sorting/selection-sort/README.pt-BR.md | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/algorithms/sorting/selection-sort/README.es-MX.md diff --git a/src/algorithms/sorting/selection-sort/README.es-MX.md b/src/algorithms/sorting/selection-sort/README.es-MX.md new file mode 100644 index 00000000..f1f1f105 --- /dev/null +++ b/src/algorithms/sorting/selection-sort/README.es-MX.md @@ -0,0 +1,20 @@ +# Selection Sort + +_Lea esto en otros lenguajes:_ +[_Português_](README.pt-BR.md), [_English_](README.md). + +_Selection sort_ es un algoritmo de ordenado, específicamente un algoritmo de ordenado _in-place_. Tiene una complejidad de tiempo O(n2), lo cual lo hace ineficiente en largas listas y generalmente es peor que el ordenamiento por inserción. _Selection sort_ es notorio por su simplicidad y en ciertas ocaciones tiene ventajas de rendimiento ante más complicados algoritmos, particularmente en donde la memoria auxiliar está limitada. + +![Visualización del algoritmo](https://upload.wikimedia.org/wikipedia/commons/b/b0/Selection_sort_animation.gif) + +![Visualización del algoritmo](https://upload.wikimedia.org/wikipedia/commons/9/94/Selection-Sort-Animation.gif) + +## Complejidad + +| Nombre | Mejor | Promedio | Peor | Memoria | Estable | Comentarios | +| ------------------ | :-----------: | :-----------: | :-----------: | :-----: | :-----: | :---------- | +| **Selection sort** | n2 | n2 | n2 | 1 | No | | + +## Referencias + +[Wikipedia](https://en.wikipedia.org/wiki/Selection_sort) diff --git a/src/algorithms/sorting/selection-sort/README.md b/src/algorithms/sorting/selection-sort/README.md index 005c6161..c9174c9d 100644 --- a/src/algorithms/sorting/selection-sort/README.md +++ b/src/algorithms/sorting/selection-sort/README.md @@ -1,7 +1,7 @@ # Selection Sort _Read this in other languages:_ -[_Português_](README.pt-BR.md). +[_Português_](README.pt-BR.md), [_Español_](README.es-MX.md). Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, diff --git a/src/algorithms/sorting/selection-sort/README.pt-BR.md b/src/algorithms/sorting/selection-sort/README.pt-BR.md index 0c45b73f..733332dd 100644 --- a/src/algorithms/sorting/selection-sort/README.pt-BR.md +++ b/src/algorithms/sorting/selection-sort/README.pt-BR.md @@ -1,7 +1,7 @@ # Selection Sort _Leia isso em outros idiomas:_ -[_English_](README.md). +[_English_](README.md), [_Español_](README.es-MX.md). Selection Sort é um algoritmo de ordenação, mais especificamente um algoritmo de ordenação por comparação in-place (requer uma quantidade constante de espaço de memória adicional). Tem complexidade O(n²), tornando-o ineficiente em listas grandes e, geralmente, tem desempenho inferior ao similar Insertion Sort. O Selection Sort é conhecido por sua simplicidade e tem vantagens de desempenho sobre algoritmos mais complexos em certas situações, particularmente quando a memória auxiliar é limitada.