fix(curriculum) replace single-line blocks with multi-line blocks for… (#41526)
* fix(curriculum) replace single-line blocks with multi-line blocks for issue 51418 Data visualization and Coding Interview Prep portions. * Update execute-a-markov-algorithm.md Implemented as inline code blocks as discussed * Adding missed blocks * Last file added
This commit is contained in:
@ -40,13 +40,7 @@ the shop -> my brother
|
||||
a never used -> .terminating rule
|
||||
</pre>
|
||||
|
||||
Sample text of:
|
||||
|
||||
`I bought a B of As from T S.`
|
||||
|
||||
Should generate the output:
|
||||
|
||||
`I bought a bag of apples from my brother.`
|
||||
Sample text of `I bought a B of As from T S.` should generate the output `I bought a bag of apples from my brother.`
|
||||
|
||||
**Ruleset 2:**
|
||||
|
||||
@ -61,13 +55,7 @@ the shop -> my brother
|
||||
a never used -> .terminating rule
|
||||
</pre>
|
||||
|
||||
Sample text of:
|
||||
|
||||
`I bought a B of As from T S.`
|
||||
|
||||
Should generate:
|
||||
|
||||
`I bought a bag of apples from T shop.`
|
||||
Sample text of `I bought a B of As from T S.` should generate `I bought a bag of apples from T shop.`
|
||||
|
||||
**Ruleset 3:**
|
||||
|
||||
@ -86,13 +74,7 @@ the shop -> my brother
|
||||
a never used -> .terminating rule
|
||||
</pre>
|
||||
|
||||
Sample text of:
|
||||
|
||||
`I bought a B of As W my Bgage from T S.`
|
||||
|
||||
Should generate:
|
||||
|
||||
`I bought a bag of apples with my money from T shop.`
|
||||
Sample text of `I bought a B of As W my Bgage from T S.` should generate `I bought a bag of apples with my money from T shop.`
|
||||
|
||||
**Ruleset 4:**
|
||||
|
||||
@ -128,13 +110,7 @@ _1 -> 1
|
||||
_+_ ->
|
||||
</pre>
|
||||
|
||||
Sample text of:
|
||||
|
||||
`_1111*11111_`
|
||||
|
||||
should generate the output:
|
||||
|
||||
`11111111111111111111`
|
||||
Sample text of `_1111*11111_` should generate the output `11111111111111111111`
|
||||
|
||||
**Ruleset 5:**
|
||||
|
||||
@ -164,13 +140,7 @@ B1 -> 1B
|
||||
1C1 -> H11
|
||||
</pre>
|
||||
|
||||
This ruleset should turn
|
||||
|
||||
`000000A000000`
|
||||
|
||||
into
|
||||
|
||||
`00011H1111000`
|
||||
This ruleset should turn `000000A000000` into `00011H1111000`
|
||||
|
||||
# --hints--
|
||||
|
||||
|
@ -12,11 +12,15 @@ Loop over multiple arrays and create a new array whose $i^{th}$ element is the c
|
||||
|
||||
For this example, if you are given this array of arrays:
|
||||
|
||||
`[ ["a", "b", "c"], ["A", "B", "C"], [1, 2, 3] ]`
|
||||
```js
|
||||
[ ["a", "b", "c"], ["A", "B", "C"], [1, 2, 3] ]
|
||||
```
|
||||
|
||||
the output should be:
|
||||
|
||||
`["aA1","bB2","cC3"]`
|
||||
```js
|
||||
["aA1","bB2","cC3"]
|
||||
```
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
@ -14,7 +14,9 @@ Make your function work with the following list of values and set of indices:
|
||||
|
||||
<code>values: [7, <b>6</b>, 5, 4, 3, 2, <b>1</b>, <b>0</b>]</code>
|
||||
|
||||
`indices(0-based): {6, 1, 7}`
|
||||
```js
|
||||
indices(0-based): {6, 1, 7}
|
||||
```
|
||||
|
||||
Where the correct result would be:
|
||||
|
||||
|
@ -32,7 +32,9 @@ testData1 = [
|
||||
|
||||
One could rank top 10 employees in each department by calling:
|
||||
|
||||
`topRankPerGroup(10, testData1, 'dept', 'salary')`
|
||||
```js
|
||||
topRankPerGroup(10, testData1, 'dept', 'salary')
|
||||
```
|
||||
|
||||
Given the following data:
|
||||
|
||||
@ -48,7 +50,9 @@ testData2 = [
|
||||
|
||||
One could rank the top-rated movie in each genre by calling:
|
||||
|
||||
`topRankPerGroup(1, testData2, 'genre', 'rating')`
|
||||
```js
|
||||
topRankPerGroup(1, testData2, 'genre', 'rating')
|
||||
```
|
||||
|
||||
The function should return an array with an array for each group containing the top `n` objects.
|
||||
|
||||
|
Reference in New Issue
Block a user