chore(i18n,learn): processed translations (#45432)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a3f503de51cf954ede28891d
|
||||
title: Find the Symmetric Difference
|
||||
title: Encuentra la diferencia simétrica
|
||||
challengeType: 5
|
||||
forumTopicId: 301611
|
||||
dashedName: find-the-symmetric-difference
|
||||
@ -8,77 +8,77 @@ dashedName: find-the-symmetric-difference
|
||||
|
||||
# --description--
|
||||
|
||||
The mathematical term <dfn>symmetric difference</dfn> (`△` or `⊕`) of two sets is the set of elements which are in either of the two sets but not in both. For example, for sets `A = {1, 2, 3}` and `B = {2, 3, 4}`, `A △ B = {1, 4}`.
|
||||
El término matemático <dfn>diferencia simétrica</dfn> (`△` or `⊕`) de dos conjuntos es el conjunto de elementos que están en cualquiera de los dos conjuntos, pero no en ambos. Por ejemplo, para los conjuntos `A = {1, 2, 3}` y `B = {2, 3, 4}`, `A △ B = {1, 4}`.
|
||||
|
||||
Symmetric difference is a binary operation, which means it operates on only two elements. So to evaluate an expression involving symmetric differences among *three* elements (`A △ B △ C`), you must complete one operation at a time. Thus, for sets `A` and `B` above, and `C = {2, 3}`, `A △ B △ C = (A △ B) △ C = {1, 4} △ {2, 3} = {1, 2, 3, 4}`.
|
||||
Diferencia simétrica es una operación binaria, significa que opera en solo dos elementos. Entonces, para evaluar una expresión que involucra diferencias simétricas entre * tres * elementos (`A △ B △ C`), tienes que completar una operación a la vez. Asi, para los conjuntos `A` y `B` encima, y `C = {2, 3}`, `A △ B △ C = (A △ B) △ C = {1, 4} △ {2, 3} = {1, 2, 3, 4}`.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Create a function that takes two or more arrays and returns an array of their symmetric difference. The returned array must contain only unique values (*no duplicates*).
|
||||
Cree una función que tome dos o más arrays y devuelva una array de sus diferencias. La array que se devuelve debe contener solo valores únicos (*no duplicados*).
|
||||
|
||||
# --hints--
|
||||
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])` should return `[3, 4, 5]`.
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])` debería retornar `[3, 4, 5]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 4, 5]);
|
||||
```
|
||||
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])` should contain only three elements.
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])`debería contener solo tres elementos.
|
||||
|
||||
```js
|
||||
assert.equal(sym([1, 2, 3], [5, 2, 1, 4]).length, 3);
|
||||
```
|
||||
|
||||
`sym([1, 2, 3, 3], [5, 2, 1, 4])` should return `[3, 4, 5]`.
|
||||
`sym([1, 2, 3, 3], [5, 2, 1, 4])` debería retornar `[3, 4, 5]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(sym([1, 2, 3, 3], [5, 2, 1, 4]), [3, 4, 5]);
|
||||
```
|
||||
|
||||
`sym([1, 2, 3, 3], [5, 2, 1, 4])` should contain only three elements.
|
||||
`sym([1, 2, 3, 3], [5, 2, 1, 4])` debería contener solo tres elementos.
|
||||
|
||||
```js
|
||||
assert.equal(sym([1, 2, 3, 3], [5, 2, 1, 4]).length, 3);
|
||||
```
|
||||
|
||||
`sym([1, 2, 3], [5, 2, 1, 4, 5])` should return `[3, 4, 5]`.
|
||||
`sym([1, 2, 3], [5, 2, 1, 4, 5])` debería retornar `[3, 4, 5]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4, 5]), [3, 4, 5]);
|
||||
```
|
||||
|
||||
`sym([1, 2, 3], [5, 2, 1, 4, 5])` should contain only three elements.
|
||||
`sym([1, 2, 3], [5, 2, 1, 4, 5])` debería contener solo tres elementos.
|
||||
|
||||
```js
|
||||
assert.equal(sym([1, 2, 3], [5, 2, 1, 4, 5]).length, 3);
|
||||
```
|
||||
|
||||
`sym([1, 2, 5], [2, 3, 5], [3, 4, 5])` should return `[1, 4, 5]`
|
||||
`sym([1, 2, 5], [2, 3, 5], [3, 4, 5])` debería retornar `[1, 4, 5]`
|
||||
|
||||
```js
|
||||
assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5]);
|
||||
```
|
||||
|
||||
`sym([1, 2, 5], [2, 3, 5], [3, 4, 5])` should contain only three elements.
|
||||
`sym([1, 2, 5], [2, 3, 5], [3, 4, 5])` debería contener solo tres elementos.
|
||||
|
||||
```js
|
||||
assert.equal(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).length, 3);
|
||||
```
|
||||
|
||||
`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` should return `[1, 4, 5]`.
|
||||
`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` debería retornar `[1, 4, 5]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5]);
|
||||
```
|
||||
|
||||
`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` should contain only three elements.
|
||||
`sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5])` debería contener solo tres elementos.
|
||||
|
||||
```js
|
||||
assert.equal(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).length, 3);
|
||||
```
|
||||
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` should return `[2, 3, 4, 6, 7]`.
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` debería retornar `[2, 3, 4, 6, 7]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -87,7 +87,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` should contain only five elements.
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3])` debería contener solo cinco elementos.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
@ -96,7 +96,7 @@ assert.equal(
|
||||
);
|
||||
```
|
||||
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` should return `[1, 2, 4, 5, 6, 7, 8, 9]`.
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` debería retornar `[1, 2, 4, 5, 6, 7, 8, 9]`.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -112,7 +112,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` should contain only eight elements.
|
||||
`sym([3, 3, 3, 2, 5], [2, 1, 5, 7], [3, 4, 6, 6], [1, 2, 3], [5, 3, 9, 8], [1])` debería contener solo ocho elementos.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
|
Reference in New Issue
Block a user