chore: resolve flagged Crowdin issues (#45442)

* chore: resolve bengali issues

* chore: resolve french issues

* chore: resolve hebrew issues

* chore: resolve persian issues

* chore: resolve portuguese brazilian issues

* chore: resolve russian issues

* chore: resolve spanish issues

* chore: resolve japanese issues
This commit is contained in:
Naomi Carrigan
2022-03-19 00:56:57 -07:00
committed by GitHub
parent 141932a69d
commit d781c63fdf
50 changed files with 108 additions and 110 deletions

View File

@ -22,7 +22,7 @@ Binary search trees are very common and useful data structures because they prov
# --instructions--
We'll start simple. We've defined the skeleton of a binary search tree structure here in addition to a function to create nodes for our tree. Observe that each node may have a left and right value. These will be assigned child subtrees if they exist. In our binary search tree, you will create a method to add new values to our binary search tree. The method should be called `add` and it should accept an integer value to add to the tree. Take care to maintain the invariant of a binary search tree: the value in each left child should be less than or equal to the parent value, and the value in each right child should be greater than or equal to the parent value. Here, let's make it so our tree cannot hold duplicate values. If we try to add a value that already exists, the method should return `null`. Otherwise, if the addition is successful, `undefined` should be returned.
We'll start simple. We've defined the skeleton of a binary search tree structure here in addition to a function to create nodes for our tree. Observe that each node may have a left and right value. These will be assigned child subtrees if they exist. In our binary search tree, you will create a method to add new values to the tree. The method should be called `add` and it should accept an integer value to add to the tree. Take care to maintain the invariant of a binary search tree: the value in each left child should be less than or equal to the parent value, and the value in each right child should be greater than or equal to the parent value. Here, let's make it so our tree cannot hold duplicate values. If we try to add a value that already exists, the method should return `null`. Otherwise, if the addition is successful, `undefined` should be returned.
**Hint:** trees are naturally recursive data structures!

View File

@ -20,7 +20,7 @@ Be careful to handle any possible edge cases when writing these methods, such as
# --hints--
The DoublyLinkedList data structure should exist.
The `DoublyLinkedList` data structure should exist.
```js
assert(
@ -34,7 +34,7 @@ assert(
);
```
The DoublyLinkedList should have a method called add.
The `DoublyLinkedList` should have a method called `add`.
```js
assert(
@ -51,7 +51,7 @@ assert(
);
```
The DoublyLinkedList should have a method called remove.
The `DoublyLinkedList` should have a method called `remove`.
```js
assert(
@ -68,7 +68,7 @@ assert(
);
```
Removing an item from an empty list should return null.
Removing an item from an empty list should return `null`.
```js
assert(
@ -82,7 +82,7 @@ assert(
);
```
The add method should add items to the list.
The `add` method should add items to the list.
```js
assert(

View File

@ -24,7 +24,7 @@ Be sure to write your code to account for collisions!
# --hints--
The HashTable data structure should exist.
The `HashTable` data structure should exist.
```js
assert(
@ -38,7 +38,7 @@ assert(
);
```
The HashTable should have an add method.
The `HashTable` should have an `add` method.
```js
assert(
@ -52,7 +52,7 @@ assert(
);
```
The HashTable should have a lookup method.
The `HashTable` should have a `lookup` method.
```js
assert(
@ -66,7 +66,7 @@ assert(
);
```
The HashTable should have a remove method.
The `HashTable` should have a `remove` method.
```js
assert(
@ -80,7 +80,7 @@ assert(
);
```
The add method should add key value pairs and the lookup method should return the values associated with a given key.
The `add` method should add key value pairs and the `lookup` method should return the values associated with a given key.
```js
assert(
@ -95,7 +95,7 @@ assert(
);
```
The remove method should accept a key as input and should remove the associated key value pair.
The `remove` method should accept a key as input and should remove the associated key value pair.
```js
assert(
@ -113,7 +113,7 @@ assert(
);
```
The remove method should only remove the correct key value pair.
The `remove` method should only remove the correct key value pair.
```js
assert(

View File

@ -26,7 +26,7 @@ Let's get some practice creating our own map. Because JavaScript objects provide
# --hints--
The Map data structure should exist.
The `Map` data structure should exist.
```js
assert(
@ -40,7 +40,7 @@ assert(
);
```
The Map object should have the following methods: add, remove, get, has, values, clear, and size.
The `Map` object should have the following methods: `add`, `remove`, `get`, `has`, `values`, `clear`, and `size`.
```js
assert(
@ -62,7 +62,7 @@ assert(
);
```
The add method should add items to the map.
The `add` method should add items to the map.
```js
assert(
@ -79,7 +79,7 @@ assert(
);
```
The has method should return true for added items and false for absent items.
The `has` method should return `true` for added items and `false` for absent items.
```js
assert(
@ -94,7 +94,7 @@ assert(
);
```
The get method should accept keys as input and should return the associated values.
The `get` method should accept keys as input and should return the associated values.
```js
assert(
@ -109,7 +109,7 @@ assert(
);
```
The values method should return all the values stored in the map as strings in an array.
The `values` method should return all the values stored in the map as strings in an array.
```js
assert(
@ -131,7 +131,7 @@ assert(
);
```
The clear method should empty the map and the size method should return the number of items present in the map.
The `clear` method should empty the map and the `size` method should return the number of items present in the map.
```js
assert(

View File

@ -12,11 +12,11 @@ Here we will move on from binary search trees and take a look at another type of
# --instructions--
Let's create a trie to store words. It will accept words through an `add` method and store these in a trie data structure. It will also allow us to query if a given string is a word with an `isWord` method, and retrieve all the words entered into the trie with a `print` method. `isWord` should return a boolean value and print should return an array of all these words as string values. In order for us to verify that this data structure is implemented correctly, we've provided a `Node` structure for each node in the tree. Each node will be an object with a `keys` property which is a JavaScript Map object. This will hold the individual letters that are valid keys of each node. We've also created an `end` property on the nodes that can be set to `true` if the node represents the termination of a word.
Let's create a trie to store words. It will accept words through an `add` method and store these in a trie data structure. It will also allow us to query if a given string is a word with an `isWord` method, and retrieve all the words entered into the trie with a `print` method. `isWord` should return a boolean value and `print` should return an array of all these words as string values. In order for us to verify that this data structure is implemented correctly, we've provided a `Node` structure for each node in the tree. Each node will be an object with a `keys` property which is a JavaScript Map object. This will hold the individual letters that are valid keys of each node. We've also created an `end` property on the nodes that can be set to `true` if the node represents the termination of a word.
# --hints--
The Trie should have an add method.
The `Trie` should have an `add` method.
```js
assert(
@ -32,7 +32,7 @@ assert(
);
```
The Trie should have a print method.
The `Trie` should have a `print` method.
```js
assert(
@ -48,7 +48,7 @@ assert(
);
```
The Trie should have an isWord method.
The `Trie` should have an `isWord` method.
```js
assert(
@ -64,7 +64,7 @@ assert(
);
```
The print method should return all items added to the trie as strings in an array.
The `print` method should return all items added to the trie as strings in an array.
```js
assert(
@ -93,7 +93,7 @@ assert(
);
```
The isWord method should return true only for words added to the trie and false for all other words.
The `isWord` method should return `true` only for words added to the trie and `false` for all other words.
```js
assert(

View File

@ -16,13 +16,13 @@ Define a JavaScript Map object and assign to it a variable called myMap. Add the
# --hints--
The myMap object should exist.
The `myMap` object should exist.
```js
assert(typeof myMap === 'object');
```
myMap should contain the key value pair `freeCodeCamp`, `Awesome!`.
`myMap` should contain the key value pair `freeCodeCamp`, `Awesome!`.
```js
assert(myMap.get('freeCodeCamp') === 'Awesome!');

View File

@ -18,7 +18,7 @@ Let's implement heap sort with a min heap. Feel free to adapt your max heap code
# --hints--
The MinHeap data structure should exist.
The `MinHeap` data structure should exist.
```js
assert(
@ -32,7 +32,7 @@ assert(
);
```
MinHeap should have a method called insert.
`MinHeap` should have a method called `insert`.
```js
assert(
@ -48,7 +48,7 @@ assert(
);
```
MinHeap should have a method called remove.
`MinHeap` should have a method called `remove`.
```js
assert(
@ -64,7 +64,7 @@ assert(
);
```
MinHeap should have a method called sort.
`MinHeap` should have a method called `sort`.
```js
assert(
@ -80,7 +80,7 @@ assert(
);
```
The sort method should return an array containing all items added to the min heap in sorted order.
The `sort` method should return an array containing all items added to the min heap in sorted order.
```js
assert(

View File

@ -18,7 +18,7 @@ Each column will represent a unique edge. Also, each edge connects two nodes. To
<blockquote> 1<br> ---<br>1 | 1<br>2 | 0<br>3 | 1</blockquote>
Here is an example of an `incidence matrix` with 4 edges and 4 nodes. Remember, the columns are the edges and rows are the nodes themselves.
Here is an example of an incidence matrix with 4 edges and 4 nodes. Remember, the columns are the edges and rows are the nodes themselves.
<blockquote> 1 2 3 4<br> --------<br>1 | 0 1 1 1<br>2 | 1 1 0 0<br>3 | 1 0 0 1<br>4 | 0 0 1 0</blockquote>

View File

@ -48,7 +48,7 @@ Finally, add a `print` method which returns an array of all the items that have
# --hints--
The MaxHeap data structure should exist.
The `MaxHeap` data structure should exist.
```js
assert(
@ -62,7 +62,7 @@ assert(
);
```
MaxHeap should have a method called insert.
`MaxHeap` should have a method called `insert`.
```js
assert(
@ -78,7 +78,7 @@ assert(
);
```
MaxHeap should have a method called print.
`MaxHeap` should have a method called `print`.
```js
assert(
@ -94,7 +94,7 @@ assert(
);
```
The insert method should add elements according to the max heap property.
The `insert` method should add elements according to the max heap property.
```js
assert(

View File

@ -25,7 +25,7 @@ assert(
);
```
The first Set() should be contained in the second Set
The first `Set` should be contained in the second `Set`
```js
assert(

View File

@ -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"].
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"]`.
```js
assert(

View File

@ -22,7 +22,7 @@ Instructions: Add a method to our max heap called `remove`. This method should r
# --hints--
The MaxHeap data structure should exist.
The `MaxHeap` data structure should exist.
```js
assert(
@ -36,7 +36,7 @@ assert(
);
```
MaxHeap should have a method called print.
`MaxHeap` should have a method called `print`.
```js
assert(
@ -52,7 +52,7 @@ assert(
);
```
MaxHeap should have a method called insert.
`MaxHeap` should have a method called `insert`.
```js
assert(
@ -68,7 +68,7 @@ assert(
);
```
MaxHeap should have a method called remove.
`MaxHeap` should have a method called `remove`.
```js
assert(
@ -84,7 +84,7 @@ assert(
);
```
The remove method should remove the greatest element from the max heap while maintaining the max heap property.
The `remove` method should remove the greatest element from the max heap while maintaining the max heap property.
```js
assert(

View File

@ -12,7 +12,7 @@ Let's create one more method for our doubly linked list called reverse which rev
# --hints--
The DoublyLinkedList data structure should exist.
The `DoublyLinkedList` data structure should exist.
```js
assert(
@ -26,7 +26,7 @@ assert(
);
```
The DoublyLinkedList should have a method called reverse.
The `DoublyLinkedList` should have a method called `reverse`.
```js
assert(
@ -43,7 +43,7 @@ assert(
);
```
Reversing an empty list should return null.
Reversing an empty list should return `null`.
```js
assert(
@ -57,7 +57,7 @@ assert(
);
```
The reverse method should reverse the list.
The `reverse` method should reverse the list.
```js
assert(
@ -77,7 +77,7 @@ assert(
);
```
The next and previous references should be correctly maintained when a list is reversed.
The `next` and `previous` references should be correctly maintained when a list is reversed.
```js
assert(

View File

@ -27,7 +27,7 @@ The same network can be represented by the matrix below.
However, it is possible to optimise the network by removing some edges and still ensure that all points on the network remain connected. The network which achieves the maximum saving is shown below. It has a weight of 93, representing a saving of 243 93 = 150 from the original network.
<img class="img-responsive center-block" alt="Network wtih seven vertices and left six edges: AB, BD, CA, DE, DF, EG" src="https://cdn.freecodecamp.org/curriculum/project-euler/minimal-network-2.png" style="background-color: white; padding: 10px;">
<img class="img-responsive center-block" alt="Network with seven vertices and left six edges: AB, BD, CA, DE, DF, EG" src="https://cdn.freecodecamp.org/curriculum/project-euler/minimal-network-2.png" style="background-color: white; padding: 10px;">
Using `network`, an 2D array representing network in matrix form, find the maximum saving which can be achieved by removing redundant edges whilst ensuring that the network remains connected. Vertices not having connection will be represented with `-1`.

View File

@ -22,7 +22,7 @@ By considering the terms in the Fibonacci sequence whose values do not exceed `n
assert(typeof fiboEvenSum(10) === 'number');
```
Your function should return an `even` value.
Your function should return an even value.
```js
assert.equal(fiboEvenSum(10) % 2 === 0, true);

View File

@ -8,7 +8,7 @@ dashedName: problem-257-angular-bisectors
# --description--
Given is an integer sided triangle $ABC$ with sides $a ≤ b ≤ c$. ($AB = c$, $BC = a$ and $AC = b$).
Given is an integer sided triangle $ABC$ with sides $a ≤ b ≤ c$ ($AB = c$, $BC = a$ and $AC = b$).
The angular bisectors of the triangle intersect the sides at points $E$, $F$ and $G$ (see picture below).

View File

@ -8,9 +8,7 @@ dashedName: problem-323-bitwise-or-operations-on-random-integers
# --description--
Let $y_0, y_1, y_2, \ldots$ be a sequence of random unsigned 32 bit integers
(i.e. $0 ≤ y_i &lt; 2^{32}$, every value equally likely).
Let $y_0, y_1, y_2, \ldots$ be a sequence of random unsigned 32 bit integers (i.e. $0 ≤ y_i &lt; 2^{32}$, every value equally likely).
For the sequence $x_i$ the following recursion is given:

View File

@ -14,7 +14,7 @@ While driving to work Seth plays the following game:
Whenever the numbers of two licence plates seen on his trip add to 1000 that's a win.
E.g. `MIC-012` and `HAN-988` is a win and `RYU-500` and `SET-500` too. (as long as he sees them in the same trip).
E.g. `MIC-012` and `HAN-988` is a win and `RYU-500` and `SET-500` too (as long as he sees them in the same trip).
Find the expected number of plates he needs to see for a win. Give your answer rounded to 8 decimal places behind the decimal point.

View File

@ -19,7 +19,7 @@ In the case of $n = 4$, there are 12 $n$-tuples of integers which satisfy both c
We define $S(t)$ as the sum of the absolute values of the integers in $t$.
For $n = 4$ we can verify that $\sum S(t) = 2087$ for all $n$-tuples t which satisfy both conditions.
For $n = 4$ we can verify that $\sum S(t) = 2087$ for all $n$-tuples $t$ which satisfy both conditions.
Find $\sum S(t)$ for $n = 7$.

View File

@ -30,7 +30,7 @@ $$\begin{align}
&(68, -504),(-1356, 1088), (-1356, -1088), (-1500, 1000), (-1500, -1000)\\}
\end{align}$$
**Note:** (-625, 0) is not an element of $C(2500, 1000)$ because $\sin(t)$ is not a rational number for the corresponding values of t.
**Note:** (-625, 0) is not an element of $C(2500, 1000)$ because $\sin(t)$ is not a rational number for the corresponding values of $t$.
$S(3, 1) = (|3| + |0|) + (|-1| + |2|) + (|-1| + |0|) + (|-1| + |-2|) = 10$

View File

@ -22,7 +22,7 @@ $2 = \varphi + \varphi^{-2}$ and $3 = \varphi^{2} + \varphi^{-2}$
To represent this sum of powers of $\varphi$ we use a string of 0's and 1's with a point to indicate where the negative exponents start. We call this the representation in the phigital numberbase.
So $1 = 1_{\varphi}$, $2 = 10.01_{\varphi}$, $3 = 100.01_{\varphi}$ and $14 = 100100.001001_{\varphi}$. The strings representing 1, 2 and 14 in the phigital number base are palindromic, while the string representing 3 is not. (the phigital point is not the middle character).
So $1 = 1_{\varphi}$, $2 = 10.01_{\varphi}$, $3 = 100.01_{\varphi}$ and $14 = 100100.001001_{\varphi}$. The strings representing 1, 2 and 14 in the phigital number base are palindromic, while the string representing 3 is not (the phigital point is not the middle character).
The sum of the positive integers not exceeding 1000 whose phigital representation is palindromic is 4345.

View File

@ -12,7 +12,7 @@ All square roots are periodic when written as continued fractions and can be wri
$\\displaystyle \\quad \\quad \\sqrt{N}=a_0+\\frac 1 {a_1+\\frac 1 {a_2+ \\frac 1 {a3+ \\dots}}}$
For example, let us consider $\\sqrt{23}:$:
For example, let us consider $\\sqrt{23}$:
$\\quad \\quad \\sqrt{23}=4+\\sqrt{23}-4=4+\\frac 1 {\\frac 1 {\\sqrt{23}-4}}=4+\\frac 1 {1+\\frac{\\sqrt{23}-3}7}$

View File

@ -30,7 +30,7 @@ assert(typeof specialPythagoreanTriplet(24) === 'number');
assert.strictEqual(specialPythagoreanTriplet(24), 480);
```
`specialPythagoreanTriplet(120)` should return 49920, 55080 or 60000
`specialPythagoreanTriplet(120)` should return 49920, 55080 or 60000.
```js
assert([49920, 55080, 60000].includes(specialPythagoreanTriplet(120)));