chore(i18n,learn): processed translations (#45454)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d8259367417b2b2512c85
|
||||
title: Implement Selection Sort
|
||||
title: Implementar la Ordenación de la selección
|
||||
challengeType: 1
|
||||
forumTopicId: 301616
|
||||
dashedName: implement-selection-sort
|
||||
@ -8,19 +8,19 @@ dashedName: implement-selection-sort
|
||||
|
||||
# --description--
|
||||
|
||||
Here we will implement selection sort. Selection sort works by selecting the minimum value in a list and swapping it with the first value in the list. It then starts at the second position, selects the smallest value in the remaining list, and swaps it with the second element. It continues iterating through the list and swapping elements until it reaches the end of the list. Now the list is sorted. Selection sort has quadratic time complexity in all cases.
|
||||
Aquí implementaremos la ordenación por selección. La ordenación por selección funciona seleccionando el valor mínimo de una lista e intercambiándolo con el primer valor de la misma. Después pasa a la segunda posición, busca y selecciona el valor más pequeño en los elementos restantes de la lista y lo mueve a la segunda posición. Continua realizando iteraciones en la lista y moviendo los elementos hasta que se llega a la última posición de la lista. Ahora la lista está ordenada. La ordenación por selección tiene una complejidad temporal cuadrática en todos los casos.
|
||||
|
||||
**Instructions**: Write a function `selectionSort` which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest.
|
||||
**Instrucciones:** Escribe una función `selectionSort` que toma un "arreglo" de enteros como entrada y devuelve un arreglo de estos enteros ordenados de menor a mayor.
|
||||
|
||||
# --hints--
|
||||
|
||||
`selectionSort` should be a function.
|
||||
`selectionSort` debería ser una función.
|
||||
|
||||
```js
|
||||
assert(typeof selectionSort == 'function');
|
||||
```
|
||||
|
||||
`selectionSort` should return a sorted array (least to greatest).
|
||||
`selectionSort` debería devolver un arreglo ordenado (de menor a mayor).
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -48,7 +48,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`selectionSort` should return an array that is unchanged except for order.
|
||||
`selectionSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` debe devolver un arreglo sin cambios excepto por el orden.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -75,7 +75,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`selectionSort` should not use the built-in `.sort()` method.
|
||||
`selectionSort` no debe utilizar el método incorporado `.sort()`.
|
||||
|
||||
```js
|
||||
assert(isBuiltInSortUsed());
|
||||
@ -109,9 +109,6 @@ function selectionSort(array) {
|
||||
return array;
|
||||
// Only change code above this line
|
||||
}
|
||||
|
||||
|
||||
selectionSort([1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]);
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
Reference in New Issue
Block a user