chore(i18n,curriculum): update translations (#42969)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: a3f503de51cf954ede28891d
|
||||
title: Find the Symmetric Difference
|
||||
title: Trovare la differenza simmetrica
|
||||
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}`.
|
||||
Il termine matematico <dfn>differenza simmetrica</dfn> (`△` o `⊕`) di due insiemi è l'insieme di elementi che sono in uno dei due insiemi ma non in entrambi. Ad esempio, per gli insiemi `A = {1, 2, 3}` e `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}`.
|
||||
La differenza simmetrica è un'operazione binaria, il che significa che opera solo su due elementi. Quindi per valutare un'espressione che comporta differenze simmetriche tra *tre* elementi (`A △ B △ C`), è necessario completare un'operazione alla volta. Così, per gli insiemi `A` e `B` di cui sopra, e `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*).
|
||||
Crea una funzione che richiede due o più array e restituisce un array della loro differenza simmetrica. L'array restituito deve contenere solo valori univoci (*nessun duplicato*).
|
||||
|
||||
# --hints--
|
||||
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])` should return `[3, 4, 5]`.
|
||||
`sym([1, 2, 3], [5, 2, 1, 4])` dovrebbe restituire `[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])` dovrebbe contenere solo tre elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` dovrebbe contenere solo tre elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` dovrebbe contenere solo tre elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` dovrebbe contenere solo tre elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` dovrebbe contenere solo tre elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` deve contenere solo cinque elementi.
|
||||
|
||||
```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])` dovrebbe restituire `[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])` dovrebbe contenere solo otto elementi.
|
||||
|
||||
```js
|
||||
assert.equal(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d825c367417b2b2512c8f
|
||||
title: Implement Merge Sort
|
||||
title: Implementare Merge Sort
|
||||
challengeType: 1
|
||||
forumTopicId: 301614
|
||||
dashedName: implement-merge-sort
|
||||
@ -8,27 +8,27 @@ dashedName: implement-merge-sort
|
||||
|
||||
# --description--
|
||||
|
||||
Another common intermediate sorting algorithm is merge sort. Like quick sort, merge sort also uses a divide-and-conquer, recursive methodology to sort an array. It takes advantage of the fact that it is relatively easy to sort two arrays as long as each is sorted in the first place. But we'll start with only one array as input, so how do we get to two sorted arrays from that? Well, we can recursively divide the original input in two until we reach the base case of an array with one item. A single-item array is naturally sorted, so then we can start combining. This combination will unwind the recursive calls that split the original array, eventually producing a final sorted array of all the elements. The steps of merge sort, then, are:
|
||||
Un altro algoritmo di ordinamento intermedio comune è Merge Sort. Come Quick Sort, anche Merge Sort utilizza una metodologia ricorsiva divide-et-impera per ordinare un array. Esso si avvale del fatto che è relativamente semplice ordinare due array se ciascuno di essi è già ordinato. Ma inizieremo con un solo array come input, quindi come arriviamo a due array ordinati partendo da quello? Bene, possiamo dividere ricorsivamente a metà l'input originale fino a raggiungere il caso base di un array con un elemento. Un array con un singolo elemento è naturalmente ordinato, quindi possiamo iniziare a combinare. Questa combinazione darà il via alle chiamate ricorsive che dividono l'array originale, producendo alla fine un array finale ordinato di tutti gli elementi. I passi di Merge Sort, sono quindi:
|
||||
|
||||
**1)** Recursively split the input array in half until a sub-array with only one element is produced.
|
||||
**1)** Dividi ricorsivamente l'array di input a metà finché non viene prodotto un sotto-array con un solo elemento.
|
||||
|
||||
**2)** Merge each sorted sub-array together to produce the final sorted array.
|
||||
**2)** Unisci tutti i sottoarray ordinati per produrre l'array finale ordinato.
|
||||
|
||||
Merge sort is an efficient sorting method, with time complexity of *O(nlog(n))*. This algorithm is popular because it is performant and relatively easy to implement.
|
||||
Il Merge Sort è un metodo di ordinamento efficiente, con complessità temporale di *O(nlog(n))*. Questo algoritmo è popolare perché è performante e relativamente facile da implementare.
|
||||
|
||||
As an aside, this will be the last sorting algorithm we cover here. However, later in the section on tree data structures we will describe heap sort, another efficient sorting method that requires a binary heap in its implementation.
|
||||
A parte questo, questo sarà l'ultimo algoritmo di ordinamento che tratteremo qui. Tuttavia, più tardi nella sezione sulle strutture di dati ad albero descriveremo Heap Sort, un altro metodo di ordinamento efficiente che richiede un heap binario nella sua implementazione.
|
||||
|
||||
**Instructions:** Write a function `mergeSort` which takes an array of integers as input and returns an array of these integers in sorted order from least to greatest. A good way to implement this is to write one function, for instance `merge`, which is responsible for merging two sorted arrays, and another function, for instance `mergeSort`, which is responsible for the recursion that produces single-item arrays to feed into merge. Good luck!
|
||||
**Istruzioni:** Scrivi una funzione `mergeSort` che prende un array di interi come input e restituisce un array di questi interi in ordine dal più piccolo al più grande. Un buon modo per implementarlo è quello di scrivere una funzione, per esempio `merge`, che si occupa dell'unione di due array, e un'altra funzione, per esempio `mergeSort`, che è responsabile della ricorsione e che produce array di elementi singoli da fornire a Merge. Buona fortuna!
|
||||
|
||||
# --hints--
|
||||
|
||||
`mergeSort` should be a function.
|
||||
`mergeSort` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof mergeSort == 'function');
|
||||
```
|
||||
|
||||
`mergeSort` should return a sorted array (least to greatest).
|
||||
`mergeSort` dovrebbe restituire un array ordinato (dal più piccolo al più grande).
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -56,7 +56,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeSort` should return an array that is unchanged except for order.
|
||||
`mergeSort([1,4,2,8,345,123,43,32,5643,63,123,43,2,55,1,234,92])` dovrebbe restituire un array invariato tranne che per l'ordine.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -83,7 +83,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`mergeSort` should not use the built-in `.sort()` method.
|
||||
`mergeSort` non dovrebbe utilizzare il metodo integrato `.sort()`.
|
||||
|
||||
```js
|
||||
assert(isBuiltInSortUsed());
|
||||
@ -117,8 +117,6 @@ function mergeSort(array) {
|
||||
return array;
|
||||
// Only change code above this line
|
||||
}
|
||||
|
||||
mergeSort([1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]);
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d8259367417b2b2512c85
|
||||
title: Implement Selection Sort
|
||||
title: Implementare Selection Sort
|
||||
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.
|
||||
Qui implementeremo Selection Sort. Selection Sort funziona selezionando il valore minimo in una lista e scambiandolo con il primo valore dell'elenco. Poi inizia dalla seconda posizione, seleziona il valore più piccolo nella lista rimanente e lo scambia con il secondo elemento. Continua a iterare attraverso la lista e scambiare gli elementi fino a raggiungere la fine della lista. Ora la lista è ordinata. Il selection sort ha una complessità di tempo quadratica in tutti i casi.
|
||||
|
||||
**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.
|
||||
**Istruzioni:** Scrivi una funzione `selectionSort` che prende un array di interi come input e restituisce un array di questi interi in ordine dal più piccolo al più grande.
|
||||
|
||||
# --hints--
|
||||
|
||||
`selectionSort` should be a function.
|
||||
`selectionSort` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof selectionSort == 'function');
|
||||
```
|
||||
|
||||
`selectionSort` should return a sorted array (least to greatest).
|
||||
`selectionSort` dovrebbe restituire un array ordinato (dal più piccolo al più grande).
|
||||
|
||||
```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])` dovrebbe restituire un array invariato tranne che per l'ordine.
|
||||
|
||||
```js
|
||||
assert.sameMembers(
|
||||
@ -75,7 +75,7 @@ assert.sameMembers(
|
||||
);
|
||||
```
|
||||
|
||||
`selectionSort` should not use the built-in `.sort()` method.
|
||||
`selectionSort` non dovrebbe usare il metodo integrato `.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--
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d8252367417b2b2512c67
|
||||
title: Add Elements at a Specific Index in a Linked List
|
||||
title: Aggiungere elementi ad un indice specifico in una lista collegata
|
||||
challengeType: 1
|
||||
forumTopicId: 301619
|
||||
dashedName: add-elements-at-a-specific-index-in-a-linked-list
|
||||
@ -8,15 +8,15 @@ dashedName: add-elements-at-a-specific-index-in-a-linked-list
|
||||
|
||||
# --description--
|
||||
|
||||
Let's create a addAt(index,element) method that adds an element at a given index. Just like how we remove elements at a given index, we need to keep track of the currentIndex as we traverse the linked list. When the currentIndex matches the given index, we would need to reassign the previous node's next property to reference the new added node. And the new node should reference the next node in the currentIndex. Returning to the conga line example, a new person wants to join the line, but he wants to join in the middle. You are in the middle of the line, so you take your hands off of the person ahead of you. The new person walks over and puts his hands on the person you once had hands on, and you now have your hands on the new person.
|
||||
Creiamo un metodo addAt(index,element) che aggiunge un elemento ad un dato indice. Proprio come come quando rimuoviamo gli elementi in un dato indice, dobbiamo tenere traccia del currentIndex mentre attraversiamo la lista collegata. Quando l'indice corrente corrisponde all'indice dato, dovremmo riassegnare la proprietà next del nodo precedente per fare riferimento al nuovo nodo aggiunto. E il nuovo nodo dovrebbe fare riferimento al nodo successivo in currentIndex. Tornando all'esempio della linea conga, una nuova persona vuole unirsi alla linea, ma vuole unirsi nel mezzo. Tu sei in mezzo alla linea, così togli le mani dalla persona che ti sta davanti. La nuova persona si inserisce e mette le mani sulla persona sulla quale prima avevi le tue mani, e tu ora metti le mani sulla nuova persona.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Create an `addAt(index,element)` method that adds an element at a given index. Return false if an element could not be added. **Note:** Remember to check if the given index is a negative or is longer than the length of the linked list.
|
||||
Crea un metodo `addAt(index,element)` che aggiunge un elemento ad un dato indice. Restituisce falso se un elemento non può essere aggiunto. **Nota:** Ricordati di controllare se l'indice fornito è negativo o è più lungo della lunghezza dell'elenco.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your `addAt` method should reassign `head` to the new node when the given index is 0.
|
||||
Il tuo metodo `addAt` dovrebbe riassegnare `head` al nuovo nodo quando l'indice dato è 0.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -30,7 +30,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Your `addAt` method should increase the length of the linked list by one for each new node added to the linked list.
|
||||
Il tuo metodo `addAt` dovrebbe aumentare di uno la lunghezza della lista collegata per ogni nuovo nodo aggiunto alla lista.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -44,7 +44,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Your `addAt` method should return `false` if a node was unable to be added.
|
||||
Il tuo metodo `addAt` dovrebbe restituire `false` se non è stato possibile aggiungere un nodo.
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d8256367417b2b2512c78
|
||||
title: Adjacency Matrix
|
||||
title: Matrice di adiacenza
|
||||
challengeType: 1
|
||||
forumTopicId: 301621
|
||||
dashedName: adjacency-matrix
|
||||
@ -8,9 +8,9 @@ dashedName: adjacency-matrix
|
||||
|
||||
# --description--
|
||||
|
||||
Another way to represent a graph is to put it in an <dfn>adjacency matrix</dfn>. An <dfn>adjacency matrix</dfn> is a two-dimensional (2D) array where each nested array has the same number of elements as the outer array. In other words, it is a matrix or grid of numbers, where the numbers represent the edges.
|
||||
Un altro modo per rappresentare un grafico è quello di metterlo in una <dfn>matrice di adiacenza</dfn>. Una matrice di <dfn>adiacenza</dfn> è un array bidimensionale (2D) in cui ogni array annidato ha lo stesso numero di elementi dell'array esterno. In altre parole, è una matrice o una griglia di numeri, dove i numeri rappresentano gli archi.
|
||||
|
||||
**Note**: The numbers to the top and left of the matrix are just labels for the nodes. Inside the matrix, ones mean there exists an edge between the vertices (nodes) representing the row and column. Finally, zeros mean there is no edge or relationship.
|
||||
**Nota**: I numeri in alto e a sinistra della matrice sono solo etichette per i nodi. All'interno della matrice, gli uni significano che esiste un arco tra i vertici (nodi) che rappresentano la riga e la colonna. Infine, gli zeri significano che non c'è un arco o relazione.
|
||||
|
||||
<pre>
|
||||
1 2 3
|
||||
@ -20,7 +20,7 @@ Another way to represent a graph is to put it in an <dfn>adjacency matrix</dfn>.
|
||||
3 | 1 0 0
|
||||
</pre>
|
||||
|
||||
Above is a very simple, undirected graph where you have three nodes, where the first node is connected to the second and third node. Below is a JavaScript implementation of the same thing.
|
||||
Quello sopra è un grafico molto semplice e non orientato con tre nodi, dove il primo nodo è collegato al secondo e al terzo nodo. Di seguito è riportata una implementazione JavaScript della stessa cosa.
|
||||
|
||||
```js
|
||||
var adjMat = [
|
||||
@ -30,7 +30,7 @@ var adjMat = [
|
||||
];
|
||||
```
|
||||
|
||||
Unlike an adjacency list, each "row" of the matrix has to have the same number of elements as nodes in the graph. Here we have a three by three matrix, which means we have three nodes in our graph. A directed graph would look similar. Below is a graph where the first node has an edge pointing toward the second node, and then the second node has an edge pointing to the third node.
|
||||
A differenza di una lista di adiacenza, ogni "riga" della matrice deve avere lo stesso numero di elementi dei nodi nel grafico. Qui abbiamo una matrice tre per tre, il che significa che abbiamo tre nodi nel nostro grafico. Un grafico orientato apparirebbe simile. Di seguito è riportato un grafico in cui il primo nodo ha un arco rivolto verso il secondo nodo, e poi il secondo nodo ha un arco che punta al terzo nodo.
|
||||
|
||||
```js
|
||||
var adjMatDirected = [
|
||||
@ -40,15 +40,15 @@ var adjMatDirected = [
|
||||
];
|
||||
```
|
||||
|
||||
Graphs can also have <dfn>weights</dfn> on their edges. So far, we have <dfn>unweighted</dfn> edges where just the presence and lack of edge is binary (`0` or `1`). You can have different weights depending on your application.
|
||||
I grafici possono anche avere <dfn>pesi</dfn> sui loro archi. Finora, abbiamo archi <dfn>non ponderati</dfn> dove la sola presenza e mancanza di archi è binaria (`0` o `1`). Puoi avere pesi diversi a seconda della tua applicazione.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Create an adjacency matrix of an undirected graph with five nodes. This matrix should be in a multi-dimensional array. These five nodes have relationships between the first and fourth node, the first and third node, the third and fifth node, and the fourth and fifth node. All edge weights are one.
|
||||
Crea una matrice di adiacenza di un grafico non orientato con cinque nodi. Questa matrice dovrebbe essere in un array multidimensionale. Questi cinque nodi hanno relazioni tra il primo e il quarto nodo, il primo e il terzo nodo, il terzo e il quinto nodo, il quarto e il quinto nodo. Tutti i pesi degli archi sono uno.
|
||||
|
||||
# --hints--
|
||||
|
||||
`undirectedAdjList` should only contain five nodes.
|
||||
`undirectedAdjList` dovrebbe contenere cinque nodi.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -63,25 +63,25 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
There should be an edge between the first and fourth node.
|
||||
Dovrebbe esserci un arco tra il primo e il quarto nodo.
|
||||
|
||||
```js
|
||||
assert(adjMatUndirected[0][3] === 1 && adjMatUndirected[3][0] === 1);
|
||||
```
|
||||
|
||||
There should be an edge between the first and third node.
|
||||
Dovrebbe esserci un arco tra il primo e il terzo nodo.
|
||||
|
||||
```js
|
||||
assert(adjMatUndirected[0][2] === 1 && adjMatUndirected[2][0] === 1);
|
||||
```
|
||||
|
||||
There should be an edge between the third and fifth node.
|
||||
Dovrebbe esserci un bordo tra il terzo e il quinto nodo.
|
||||
|
||||
```js
|
||||
assert(adjMatUndirected[2][4] === 1 && adjMatUndirected[4][2] === 1);
|
||||
```
|
||||
|
||||
There should be an edge between the fourth and fifth node.
|
||||
Dovrebbe esserci un arco tra il quarto e il quinto nodo.
|
||||
|
||||
```js
|
||||
assert(adjMatUndirected[3][4] === 1 && adjMatUndirected[4][3] === 1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bd7156d8c242eddfaeb5bd13
|
||||
title: Build a freeCodeCamp Forum Homepage
|
||||
title: Costruisci una Homepage del Forum freeCodeCamp
|
||||
challengeType: 3
|
||||
forumTopicId: 302349
|
||||
dashedName: build-a-freecodecamp-forum-homepage
|
||||
@ -8,21 +8,21 @@ dashedName: build-a-freecodecamp-forum-homepage
|
||||
|
||||
# --description--
|
||||
|
||||
**Objective:** Build a [CodePen.io](https://codepen.io) app that is functionally similar to this: <https://codepen.io/freeCodeCamp/full/JqdoMV>.
|
||||
**Obiettivo:** Costruisci un'app [CodePen.io](https://codepen.io) funzionalmente simile a questa: <https://codepen.io/freeCodeCamp/full/JqdoMV>.
|
||||
|
||||
Fulfill the below [user stories](https://en.wikipedia.org/wiki/User_story). Use whichever libraries or APIs you need. Give it your own personal style.
|
||||
Soddisfa le seguenti [user story](https://en.wikipedia.org/wiki/User_story). Utilizza le librerie o le API di cui hai bisogno. Usa il tuo stile personale.
|
||||
|
||||
**User Story:** I can see a list of the most recent posts on the freeCodeCamp forum.
|
||||
**User Story:** Posso vedere un elenco dei post più recenti sul forum freeCodeCamp.
|
||||
|
||||
**User Story:** For each topic, I can see the title and a list of links to users who have recently posted in it.
|
||||
**User Story:** Per ogni argomento, posso vedere il titolo e un elenco di link agli utenti che hanno recentemente pubblicato su di esso.
|
||||
|
||||
**User Story:** I can see the number of replies and views that each topic has had, and a timestamp of when the topic was last active.
|
||||
**User Story:** Posso vedere il numero di risposte e di visualizzazioni che ogni argomento ha avuto, e un timestamp di quando l'argomento è stato attivo l'ultima volta.
|
||||
|
||||
**Hint:** To get the 30 most recent forum posts: <https://forum-proxy.freecodecamp.rocks/latest>.
|
||||
**Suggerimento:** Per ottenere i 30 post più recenti del forum: <https://forum-proxy.freecodecamp.rocks/latest>.
|
||||
|
||||
When you are finished, include a link to your project on CodePen and click the "I've completed this challenge" button.
|
||||
Quando hai finito, includi un link al tuo progetto su CodePen e clicca sul pulsante "Ho completato questa sfida".
|
||||
|
||||
You can get feedback on your project by sharing it on the [freeCodeCamp forum](https://forum.freecodecamp.org/c/project-feedback/409).
|
||||
Puoi ottenere un feedback sul tuo progetto condividendolo sul forum [freeCodeCamp](https://forum.freecodecamp.org/c/project-feedback/409).
|
||||
|
||||
# --solutions--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bd7150d8c442eddfafb5bd1c
|
||||
title: P2P Video Chat Application
|
||||
title: Applicazione Video Chat P2P
|
||||
challengeType: 4
|
||||
forumTopicId: 302366
|
||||
dashedName: p2p-video-chat-application
|
||||
@ -8,31 +8,31 @@ dashedName: p2p-video-chat-application
|
||||
|
||||
# --description--
|
||||
|
||||
**Objective:** Build a [Replit](https://replit.com/) app that is functionally similar to this: <https://p2p-video-chat-application.freecodecamp.rocks/>.
|
||||
**Obiettivo:** Costruisci un'app [Replit](https://replit.com/) funzionalmente simile a questa: <https://p2p-video-chat-application.freecodecamp.rocks/>.
|
||||
|
||||
Fulfill the below [user stories](https://en.wikipedia.org/wiki/User_story). Use whichever libraries or APIs you need. Give it your own personal style.
|
||||
Soddisfa le seguenti [user story](https://en.wikipedia.org/wiki/User_story). Utilizza le librerie o le API di cui hai bisogno. Usa il tuo stile personale.
|
||||
|
||||
**User Story:** Upon arriving, the browser will prompt me to access my camera and microphone.
|
||||
**User Story:** All'arrivo, il browser mi chiederà di accedere alla mia fotocamera e al mio microfono.
|
||||
|
||||
**User Story:** After I give it permission, I am prompted to type in a room name.
|
||||
**User Story:** Dopo aver dato il permesso, mi viene chiesto di digitare il nome di una stanza.
|
||||
|
||||
**User Story:** Once I type in the room name, a room will be created if no room of that name existed before.
|
||||
**User Story:** Una volta digitato il nome della stanza, se non esiste una stanza con quel nome ne verrà creata una.
|
||||
|
||||
**User Story:** A friend of mine can subsequently go to the same website, type in the same room I entered, and join the same room, then enter into a video chat with me.
|
||||
**User Story:** Di conseguenza un amico potrà andare allo stesso sito web, digitare lo stesso nome per la stanza, unirsi alla stessa stanza e iniziare una chat video con me.
|
||||
|
||||
**User Story:** If I type in a room name, and there are already two people in that room, I get a notification that the room is full.
|
||||
**User Story:** Se scrivo il nome della stanza, e ci sono già due persone all'interno di una stanza, ricevo una notifica che la stanza è piena.
|
||||
|
||||
**User Story:** Anyone can create or join any room. And there can be any number of rooms, but all of them must have unique names.
|
||||
**User Story:** Chiunque può creare o unirsi ad una qualsiasi stanza. E ci può essere qualsiasi numero di stanze, ma ognuna deve avere un nome univoco.
|
||||
|
||||
**User Story:** I can choose to not permit the site to access my microphone and webcam. If I choose not to do this, or if some other driver problem occurs, I see an error message saying these are required.
|
||||
**User Story:** Posso scegliere di non permettere al sito di usare il mio microfono e la mia webcam. Se scelgo di non farlo, o se si presenta qualche altro problema di driver, vedo un messaggio di errore che dice che sono richiesti.
|
||||
|
||||
**User Story:** When I choose to cancel the room name input step, or if I type in no name, or just spaces, it should again ask me again to type in a valid room name.
|
||||
**User Story:** Quando scelgo di cancellare lo step di scrivere il nome di una stanza, o se non scrivo alcun nome, o se scrivo solo spazi, dovrei ricevere di nuovo la richiesta di scrivere un nome di stanza valido.
|
||||
|
||||
**User Story:** If one of the two people in the room get disconnected, they can reconnect to the same room and continue chatting.
|
||||
**User Story:** Se una delle due persone in una stanza viene disconnessa, si può riconnettere alla stessa stanza e continuare a chattare.
|
||||
|
||||
Once you've finished implementing these user stories, enter the URL to your live app and, optionally, your GitHub repository. Then click the "I've completed this challenge" button.
|
||||
Una volta terminata l'implementazione di queste user story, scrivi l'URL della tua app live e, opzionalmente, il tuo repository GitHub. Quindi clicca sul pulsante "Ho completato questa sfida".
|
||||
|
||||
You can get feedback on your project by sharing it on the [freeCodeCamp forum](https://forum.freecodecamp.org/c/project-feedback/409).
|
||||
Puoi ottenere un feedback sul tuo progetto condividendolo sul forum [freeCodeCamp](https://forum.freecodecamp.org/c/project-feedback/409).
|
||||
|
||||
# --solutions--
|
||||
|
||||
|
Reference in New Issue
Block a user