diff --git a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-bubble-sort.md b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-bubble-sort.md index 6cf8150f25..b63ca67e3a 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-bubble-sort.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-bubble-sort.md @@ -1,6 +1,6 @@ --- id: 8d5123c8c441eddfaeb5bdef -title: Implement Bubble Sort +title: Implementare Bubble Sort challengeType: 1 forumTopicId: 301612 dashedName: implement-bubble-sort @@ -8,23 +8,23 @@ dashedName: implement-bubble-sort # --description-- -This is the first of several challenges on sorting algorithms. Given an array of unsorted items, we want to be able to return a sorted array. We will see several different methods to do this and learn some tradeoffs between these different approaches. While most modern languages have built-in sorting methods for operations like this, it is still important to understand some of the common basic approaches and learn how they can be implemented. +Questa è la prima di diverse sfide sugli algoritmi di ordinamento. Dato un array di elementi non ordinati, vogliamo essere in grado di restituire un array ordinato. Vedremo diversi metodi per farlo e impareremo alcuni compromessi tra questi diversi approcci. Mentre la maggior parte dei linguaggi moderni ha integrato metodi di ordinamento per operazioni come questa, è ancora importante comprendere alcuni degli approcci di base comuni e imparare come possono essere attuati. -Here we will see bubble sort. The bubble sort method starts at the beginning of an unsorted array and 'bubbles up' unsorted values towards the end, iterating through the array until it is completely sorted. It does this by comparing adjacent items and swapping them if they are out of order. The method continues looping through the array until no swaps occur at which point the array is sorted. +Qui vedremo il Bubble Sort. Il metodo di ordinamento Bubble Sort comincia all'inizio di un array non ordinato e 'porta a galla' i valori non ordinati verso la fine, iterando attraverso l'array fino a quando non è completamente ordinato. Lo fa confrontando gli elementi adiacenti e scambiandoli se sono fuori ordine. Il metodo continua a iterare attraverso l'array fino a quando non si verificano più scambi: a quel punto l'array è ordinato. -This method requires multiple iterations through the array and for average and worst cases has quadratic time complexity. While simple, it is usually impractical in most situations. +Questo metodo richiede iterazioni multiple attraverso l'array e per i casi medi e peggiori ha complessità di tempo quadratica. Per quanto semplice, è poco pratico nella maggior parte delle situazioni. -**Instructions:** Write a function `bubbleSort` 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 `bubbleSort` che prende un array di interi come input e restituisce un array di questi interi in ordine dal più piccolo al più grande. # --hints-- -`bubbleSort` should be a function. +`bubbleSort` dovrebbe essere una funzione. ```js assert(typeof bubbleSort == 'function'); ``` -`bubbleSort` should return a sorted array (least to greatest). +`bubbleSort` dovrebbe restituire un array ordinato (dal più piccolo al più grande). ```js assert( @@ -52,7 +52,7 @@ assert( ); ``` -`bubbleSort` should return an array that is unchanged except for order. +`bubbleSort([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( @@ -79,7 +79,7 @@ assert.sameMembers( ); ``` -`bubbleSort` should not use the built-in `.sort()` method. +`bubbleSort` non dovrebbe usare il metodo integrato `.sort()`. ```js assert(isBuiltInSortUsed()); @@ -113,8 +113,6 @@ function bubbleSort(array) { return array; // Only change code above this line } - -bubbleSort([1, 4, 2, 8, 345, 123, 43, 32, 5643, 63, 123, 43, 2, 55, 1, 234, 92]); ``` # --solutions-- diff --git a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/no-repeats-please.md b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/no-repeats-please.md index 7fc964e03f..7db2a88e5b 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/no-repeats-please.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/no-repeats-please.md @@ -1,6 +1,6 @@ --- id: a7bf700cd123b9a54eef01d5 -title: No Repeats Please +title: Nessuna ripetizione per favore challengeType: 5 forumTopicId: 16037 dashedName: no-repeats-please @@ -8,67 +8,67 @@ dashedName: no-repeats-please # --description-- -Return the number of total permutations of the provided string that don't have repeated consecutive letters. Assume that all characters in the provided string are each unique. +Restituisci il numero di permutazioni totali della stringa fornita che non hanno lettere consecutive ripetute. Supponiamo che tutti i caratteri della stringa fornita siano univoci. -For example, `aab` should return 2 because it has 6 total permutations (`aab`, `aab`, `aba`, `aba`, `baa`, `baa`), but only 2 of them (`aba` and `aba`) don't have the same letter (in this case `a`) repeating. +Ad esempio, `aab` dovrebbe restituire 2 perché ha 6 permutazioni totali (`aab`, `aab`, `aba`, `aba`, `baa`, `baa`), ma solo 2 di loro (`aba` e `aba`) non hanno la stessa lettera (in questo caso `a`) ripetuta. # --hints-- -`permAlone("aab")` should return a number. +`permAlone("aab")` dovrebbe restituire un numero. ```js assert.isNumber(permAlone('aab')); ``` -`permAlone("aab")` should return 2. +`permAlone("aab")` dovrebbe restituire 2. ```js assert.strictEqual(permAlone('aab'), 2); ``` -`permAlone("aaa")` should return 0. +`permAlone("aaa")` dovrebbe restituire 0. ```js assert.strictEqual(permAlone('aaa'), 0); ``` -`permAlone("aabb")` should return 8. +`permAlone("aabb")` dovrebbe restituire 8. ```js assert.strictEqual(permAlone('aabb'), 8); ``` -`permAlone("abcdefa")` should return 3600. +`permAlone("abcdefa")` dovrebbe restituire 3600. ```js assert.strictEqual(permAlone('abcdefa'), 3600); ``` -`permAlone("abfdefa")` should return 2640. +`permAlone("abfdefa")` dovrebbe restituire 2640. ```js assert.strictEqual(permAlone('abfdefa'), 2640); ``` -`permAlone("zzzzzzzz")` should return 0. +`permAlone("zzzzzzzz")` dovrebbe restituire 0. ```js assert.strictEqual(permAlone('zzzzzzzz'), 0); ``` -`permAlone("a")` should return 1. +`permAlone("a")` dovrebbe restituire 1. ```js assert.strictEqual(permAlone('a'), 1); ``` -`permAlone("aaab")` should return 0. +`permAlone("aaab")` dovrebbe restituire 0. ```js assert.strictEqual(permAlone('aaab'), 0); ``` -`permAlone("aaabb")` should return 12. +`permAlone("aaabb")` dovrebbe restituire 12. ```js assert.strictEqual(permAlone('aaabb'), 12); diff --git a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/pairwise.md b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/pairwise.md index 215b2fda0a..375742513f 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/pairwise.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/pairwise.md @@ -1,6 +1,6 @@ --- id: a3f503de51cfab748ff001aa -title: Pairwise +title: A coppie challengeType: 5 forumTopicId: 301617 dashedName: pairwise @@ -8,11 +8,11 @@ dashedName: pairwise # --description-- -Given an array `arr`, find element pairs whose sum equal the second argument `arg` and return the sum of their indices. +Dato un array `arr`, trova coppie di elementi la cui somma è uguale al secondo argomento `arg` e restituisci la somma dei loro indici. -You may use multiple pairs that have the same numeric elements but different indices. Each pair should use the lowest possible available indices. Once an element has been used it cannot be reused to pair with another element. For instance, `pairwise([1, 1, 2], 3)` creates a pair `[2, 1]` using the 1 at index 0 rather than the 1 at index 1, because 0+2 < 1+2. +È possibile utilizzare più coppie che hanno gli stessi elementi numerici ma indici diversi. Ogni coppia dovrebbe utilizzare i più bassi indici disponibili. Una volta che un elemento è stato usato, non può essere riutilizzato per accoppiarsi con un altro elemento. Per esempio, `pairwise([1, 1, 2], 3)` crea una coppia `[2, 1]` usando l’1 all’indice 0 piuttosto che l’1 all’indice 1, perché 0+2 < 1+2. -For example `pairwise([7, 9, 11, 13, 15], 20)` returns `6`. The pairs that sum to 20 are `[7, 13]` and `[9, 11]`. We can then write out the array with their indices and values. +Per esempio `pairwise([7, 9, 11, 13, 15], 20)` restituisce `6`. Le coppie la cui somma è 20 sono `[7, 13]` e `[9, 11]`. Possiamo poi scrivere l'array con i loro indici e valori.
Node1: Node2, Node3-Above is an undirected graph because `Node1` is connected to `Node2` and `Node3`, and that information is consistent with the connections `Node2` and `Node3` show. An adjacency list for a directed graph would mean each row of the list shows direction. If the above was directed, then `Node2: Node1` would mean there the directed edge is pointing from `Node2` towards `Node1`. We can represent the undirected graph above as an adjacency list by putting it within a JavaScript object. +Quello sopra è un grafico non orientato perché `Node1` è connesso a `Node2` e `Node3`, e tali informazioni sono coerenti con le connessioni `Node2` e `Node3`. La lista di adiacenza per un grafico orientato significherebbe che ogni riga della lista mostra la direzione. Se quanto sopra fosse orientato, allora `Node2: Node1` significherebbe che l'arco orientato sta puntando da `Node2` verso `Node1`. Possiamo rappresentare il grafo non orientato qui sopra come una lista di adiacenza inserendolo in un oggetto JavaScript. ```js var undirectedG = { @@ -22,7 +22,7 @@ var undirectedG = { }; ``` -This can also be more simply represented as an array where the nodes just have numbers rather than string labels. +Questo può anche essere rappresentato più semplicemente come un array in cui i nodi hanno solo numeri invece di etichette di stringa. ```js var undirectedGArr = [ @@ -34,17 +34,17 @@ var undirectedGArr = [ # --instructions-- -Create a social network as an undirected graph with 4 nodes/people named `James`, `Jill`, `Jenny`, and `Jeff`. There are edges/relationships between James and Jeff, Jill and Jenny, and Jeff and Jenny. +Crea un social network come grafo non orientato con 4 nodi/persone di nome `James`, `Jill`, `Jenny`, e `Jeff`. Ci sono lati/rapporti tra James e Jeff, Jill e Jenny, e Jeff e Jenny. # --hints-- -`undirectedAdjList` should only contain four nodes. +`undirectedAdjList` dovrebbe contenere solo quattro nodi. ```js assert(Object.keys(undirectedAdjList).length === 4); ``` -There should be an edge between `Jeff` and `James`. +Ci dovrebbe essere un arco tra `Jeff` e `James`. ```js assert( @@ -53,7 +53,7 @@ assert( ); ``` -There should be an edge between `Jill` and `Jenny`. +Ci dovrebbe essere un arco tra `Jill` e `Jenny`. ```js assert( @@ -62,7 +62,7 @@ assert( ); ``` -There should be an edge between `Jeff` and `Jenny`. +Dovrebbe esserci un arco tra `Jeff` e `Jenny`. ```js assert( diff --git a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-an-element-is-present-in-a-binary-search-tree.md b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-an-element-is-present-in-a-binary-search-tree.md index 03daa65cb2..422b7e188d 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-an-element-is-present-in-a-binary-search-tree.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-an-element-is-present-in-a-binary-search-tree.md @@ -1,6 +1,6 @@ --- id: 587d8257367417b2b2512c7c -title: Check if an Element is Present in a Binary Search Tree +title: Controllare se un elemento è presente in un albero binario di ricerca challengeType: 1 forumTopicId: 301623 dashedName: check-if-an-element-is-present-in-a-binary-search-tree @@ -8,15 +8,15 @@ dashedName: check-if-an-element-is-present-in-a-binary-search-tree # --description-- -Now that we have a general sense of what a binary search tree is let's talk about it in a little more detail. Binary search trees provide logarithmic time for the common operations of lookup, insertion, and deletion in the average case, and linear time in the worst case. Why is this? Each of those basic operations requires us to find an item in the tree (or in the case of insertion to find where it should go) and because of the tree structure at each parent node we are branching left or right and effectively excluding half the size of the remaining tree. This makes the search proportional to the logarithm of the number of nodes in the tree, which creates logarithmic time for these operations in the average case. Ok, but what about the worst case? Well, consider constructing a tree from the following values, adding them left to right: `10`, `12`, `17`, `25`. Following our rules for a binary search tree, we will add `12` to the right of `10`, `17` to the right of this, and `25` to the right of this. Now our tree resembles a linked list and traversing it to find `25` would require us to traverse all the items in linear fashion. Hence, linear time in the worst case. The problem here is that the tree is unbalanced. We'll look a little more into what this means in the following challenges. +Ora che abbiamo un senso generale di cosa è un albero binario di ricerca, parliamo di esso in maggiore dettaglio. Gli alberi binari di ricerca richiedono un tempo logaritmico per le operazioni comuni di ricerca, inserimento, e cancellazione nel caso medio, e tempo lineare nel caso peggiore. Perché? Ognuna di queste operazioni di base ci richiede di trovare un elemento nell'albero (o nel caso di inserimento per trovare dove dovrebbe andare) e a causa della struttura ad albero ad ogni nodo genitore ci dirigiamo o a sinistra o a destra escludendo efficacemente metà della dimensione dell'albero rimanente. Questo rende la ricerca proporzionale al logaritmo del numero di nodi nell'albero, che nel caso medio dà un tempo logaritmico per queste operazioni. Ok, ma nel caso peggiore? Bene, immagina di costruire un albero con i seguenti valori, aggiungendoli da sinistra a destra: `10`, `12`, `17`, `25`. Seguendo le nostre regole per un albero di ricerca binario, aggiungeremo `12` alla destra di `10`, `17` a destra di questo, e `25` a destra di questo. Ora il nostro albero assomiglia a una lista collegata e attraversarlo per trovare `25` ci richiederebbe di attraversare tutti gli oggetti in modo lineare. Quindi, tempo lineare nel caso peggiore. Il problema qui è che l'albero non è bilanciato. Esamineremo un po' di più il significato di questo nelle seguenti sfide. # --instructions-- -In this challenge, we will create a utility for our tree. Write a method `isPresent` which takes an integer value as input and returns a boolean value for the presence or absence of that value in the binary search tree. +In questa sfida, creeremo un'utilità per il nostro albero. Scrivi un metodo `isPresent` che prende un valore intero come input e restituisce un valore booleano per la presenza o l'assenza di quel valore nell'albero binario di ricerca. # --hints-- -The `BinarySearchTree` data structure should exist. +La struttura di dati `BinarySearchTree` dovrebbe esistere. ```js assert( @@ -30,7 +30,7 @@ assert( ); ``` -The binary search tree should have a method called `isPresent`. +L'albero binario di ricerca dovrebbe avere un metodo chiamato `isPresent`. ```js assert( @@ -46,7 +46,7 @@ assert( ); ``` -The `isPresent` method should correctly check for the presence or absence of elements added to the tree. +Il metodo `isPresent` dovrebbe controllare correttamente la presenza o l'assenza di elementi aggiunti all'albero. ```js assert( @@ -74,7 +74,7 @@ assert( ); ``` -`isPresent` should handle cases where the tree is empty. +`isPresent` dovrebbe gestire i casi in cui l'albero è vuoto. ```js assert( diff --git a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-binary-search-tree.md b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-binary-search-tree.md index 42081a1355..b7ec78ddd1 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-binary-search-tree.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/check-if-binary-search-tree.md @@ -1,6 +1,6 @@ --- id: 5cc0c1b32479e176caf3b422 -title: Check if Tree is Binary Search Tree +title: Controlla se l'albero è un albero binario di ricerca challengeType: 1 forumTopicId: 301624 dashedName: check-if-tree-is-binary-search-tree @@ -8,17 +8,17 @@ dashedName: check-if-tree-is-binary-search-tree # --description-- -Since you already know what a binary search tree is, this challenge will establish how it is you can tell that a tree is a binary search tree or not. +Dal momento che sai già cos'è un albero binario di ricerca, questa sfida stabilirà come è possibile stabilire se un albero è un albero binario di ricerca o no. -The main distinction of a binary search tree is that the nodes are ordered in an organized fashion. Nodes have at most 2 child nodes (placed to the right and/or left) based on if the child node's value is greater than or equal to (right) or less than (left) the parent node. +Quello che contraddistingue un albero binario di ricerca è che i nodi sono ordinati in modo organizzato. I nodi hanno al massimo 2 nodi figli (posizionati a destra e/o a sinistra) in base al fatto che il valore del nodo figlio sia maggiore o uguale a (destra) o inferiore a (sinistra) quello del nodo principale. # --instructions-- -In this challenge, you will create a utility for your tree. Write a JavaScript method `isBinarySearchTree` which takes a tree as an input and returns a boolean value for whether the tree is a binary search tree or not. Use recursion whenever possible. +In questa sfida, creerai un'utilità per il tuo albero. Scrivi un metodo JavaScript `isBinarySearchTree` che prende un albero come input e restituisce un valore booleano a seconda se l'albero è un albero binario di ricerca o no. Usa la ricorsione quando possibile. # --hints-- -Your Binary Search Tree should return true when checked with `isBinarySearchTree()`. +Il tuo albero di ricerca binario dovrebbe restituire true quando controllato con `isBinarySearchTree()`. ```js assert( diff --git a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/perform-a-union-on-two-sets.md b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/perform-a-union-on-two-sets.md index 04ecfb767f..1ffa861051 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/perform-a-union-on-two-sets.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/perform-a-union-on-two-sets.md @@ -1,6 +1,6 @@ --- id: 587d8253367417b2b2512c6c -title: Perform a Union on Two Sets +title: Eseguire l'unione di due insiemi challengeType: 1 forumTopicId: 301708 dashedName: perform-a-union-on-two-sets @@ -8,13 +8,13 @@ dashedName: perform-a-union-on-two-sets # --description-- -In this exercise we are going to perform a union on two sets of data. We will create a method on our `Set` data structure called `union`. This method should take another `Set` as an argument and return the `union` of the two sets, excluding any duplicate values. +In questo esercizio eseguiremo l'unione di due serie di dati. Creeremo un metodo sulla nostra struttura dati `Set` chiamato `union`. Questo metodo dovrebbe prendere un altro `Set` come argomento e restituire l'`union` dei due insiemi, escludendo eventuali valori duplicati. -For example, if `setA = ['a','b','c']` and `setB = ['a','b','d','e']`, then the union of setA and setB is: `setA.union(setB) = ['a', 'b', 'c', 'd', 'e']`. +Per esempio, se `setA = ['a','b','c']` e `setB = ['a','b','d','e']`, allora l'unione di setA e setB è: `setA.union(setB) = ['a', 'b', 'c', 'd', 'e']`. # --hints-- -Your `Set` class should have a `union` method. +La tua classe `Set` dovrebbe avere un metodo `union`. ```js assert( @@ -25,7 +25,7 @@ assert( ); ``` -The union of a Set containing values ["a", "b", "c"] and a Set containing values ["c", "d"] should return a new Set containing values ["a", "b", "c", "d"]. +L'unione di un insieme contenente valori ["a", "b", "c"] e un insieme contenente valori ["c", "d"] dovrebbe restituire un nuovo Set contenente valori ["a", "b", "c", "d"]. ```js assert( diff --git a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/remove-items-from-a-set-in-es6.md b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/remove-items-from-a-set-in-es6.md index c958d1922c..cabf7e80de 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/remove-items-from-a-set-in-es6.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/remove-items-from-a-set-in-es6.md @@ -1,6 +1,6 @@ --- id: 587d8254367417b2b2512c71 -title: Remove items from a set in ES6 +title: Rimuovi elementi da un insieme in ES6 challengeType: 1 forumTopicId: 301713 dashedName: remove-items-from-a-set-in-es6 @@ -8,15 +8,15 @@ dashedName: remove-items-from-a-set-in-es6 # --description-- -Let's practice removing items from an ES6 Set using the `delete` method. +Esercitiamoci con la rimozione di elementi da un Set ES6 utilizzando il metodo `delete`. -First, create an ES6 Set: +Per prima cosa, crea un Set ES6: ```js var set = new Set([1,2,3]); ``` -Now remove an item from your Set with the `delete` method. +Ora rimuovi un elemento dal tuo Set con il metodo `delete`. ```js set.delete(1); @@ -25,13 +25,13 @@ console.log([...set]) // should return [ 2, 3 ] # --instructions-- -Now, create a set with the integers 1, 2, 3, 4, & 5. +Ora, crea un set con gli interi 1, 2, 3, 4 e 5. -Remove the values 2 and 5, and then return the set. +Rimuovi i valori 2 e 5, quindi restituisci il set. # --hints-- -Your Set should contain the values 1, 3, & 4 +Il Set deve contenere i valori 1, 3 e 4 ```js assert( diff --git a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/reverse-a-doubly-linked-list.md b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/reverse-a-doubly-linked-list.md index 58edfaa2a5..be06c37599 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/data-structures/reverse-a-doubly-linked-list.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/data-structures/reverse-a-doubly-linked-list.md @@ -1,6 +1,6 @@ --- id: 587d825a367417b2b2512c88 -title: Reverse a Doubly Linked List +title: Invertire una lista a doppio collegamento challengeType: 1 forumTopicId: 301714 dashedName: reverse-a-doubly-linked-list @@ -8,11 +8,11 @@ dashedName: reverse-a-doubly-linked-list # --description-- -Let's create one more method for our doubly linked list called reverse which reverses the list in place. Once the method is executed the head should point to the previous tail and the tail should point to the previous head. Now, if we traverse the list from head to tail we should meet the nodes in a reverse order compared to the original list. Trying to reverse an empty list should return null. +Creiamo un metodo in più per la nostra lista a doppio collegamento, chiamato reverse, che inverte la lista "in place" (NdT: cioè lavorando sulla lista stessa, senza crearne una copia). Una volta eseguito il metodo la testa dovrebbe puntare alla vecchia coda e la coda dovrebbe puntare alla vecchia testa. Ora, se attraversiamo la lista dalla testa alla coda dovremmo incontrare i nodi in ordine inverso rispetto alla lista originale. Tentare di invertire una lista vuota dovrebbe restituire null. # --hints-- -The DoublyLinkedList data structure should exist. +La struttura dei dati DoublyLinkedList dovrebbe esistere. ```js assert( @@ -26,7 +26,7 @@ assert( ); ``` -The DoublyLinkedList should have a method called reverse. +La lista DoublyLinkedList dovrebbe avere un metodo chiamato reverse. ```js assert( @@ -43,7 +43,7 @@ assert( ); ``` -Reversing an empty list should return null. +Invertire una lista vuota dovrebbe restituire null. ```js assert( @@ -57,7 +57,7 @@ assert( ); ``` -The reverse method should reverse the list. +Il metodo reverse dovrebbe invertire l'elenco. ```js assert( @@ -77,7 +77,7 @@ assert( ); ``` -The next and previous references should be correctly maintained when a list is reversed. +I riferimenti next e previous dovrebbero essere mantenuti correttamente quando un elenco è invertito. ```js assert( diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md index 11b762605d..98108545ec 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md @@ -25,7 +25,7 @@ addSum(3); # --instructions-- -Crie uma função `addFive` sem qualquer argumento. Essa função adiciona 5 à variávelsum`, mas o valor retornado é
Node2: Node1
Node3: Node1
undefined`.
+Crie uma função `addFive` sem qualquer argumento. Essa função adiciona 5 à variável`sum`, mas o valor retornado é `undefined`.
# --hints--
@@ -35,7 +35,7 @@ Crie uma função `addFive` sem qualquer argumento. Essa função adiciona 5 à
assert(typeof addFive === 'function');
```
-Uma vez que ambas as funções são executadas, a `soma` deve ser igual a `8`.
+Uma vez que ambas as funções são executadas, a `sum` deve ser igual a `8`.
```js
assert(sum === 8);
@@ -47,12 +47,13 @@ Valor retornado de `addFive` deve ser `undefined`.
assert(addFive() === undefined);
```
-Dentro da função `addFive`, você deve adicionar `5` à variável `sum.
+Dentro da função `addFive`, você deve adicionar `5` à variável `sum`.
-assert(
+```js
+assert(
__helpers.removeWhiteSpace(addFive.toString()).match(/sum=sum\+5|sum\+=5/)
);
-`
+```
# --seed--