chore(i8n,learn): processed translations
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
15047f2d90
commit
e5c44a3ae5
@ -1,23 +1,20 @@
|
||||
---
|
||||
id: 5958469238c0d8d2632f46db
|
||||
title: 组合
|
||||
title: Combinations
|
||||
challengeType: 5
|
||||
videoUrl: ''
|
||||
forumTopicId: 302233
|
||||
dashedName: combinations
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
任务:
|
||||
Given non-negative integers `m` and `n`, generate all size `m` combinations of the integers from `0` (zero) to `n-1` in sorted order (each combination is sorted and the entire table is sorted).
|
||||
|
||||
给定非负整数m和n ,以排序顺序生成从0 (零)到n-1的整数的所有大小m个 [组合](http://mathworld.wolfram.com/Combination.html "链接:http://mathworld.wolfram.com/Combination.html") (每个组合被排序并且整个表被排序)。
|
||||
**Example:**
|
||||
|
||||
例:
|
||||
`3` comb `5` is:
|
||||
|
||||
3梳子5是:
|
||||
|
||||
```
|
||||
0 1 2
|
||||
<pre>0 1 2
|
||||
0 1 3
|
||||
0 1 4
|
||||
0 2 3
|
||||
@ -27,25 +24,23 @@ dashedName: combinations
|
||||
1 2 4
|
||||
1 3 4
|
||||
2 3 4
|
||||
```
|
||||
|
||||
</pre>
|
||||
|
||||
# --hints--
|
||||
|
||||
`combinations`是一种功能。
|
||||
`combinations` should be a function.
|
||||
|
||||
```js
|
||||
assert(typeof combinations === 'function');
|
||||
```
|
||||
|
||||
`combinations(3, 5)`应返回`[[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 3], [0, 2, 4], [0, 3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]` 。
|
||||
`combinations(3, 5)` should return `[[0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 3], [0, 2, 4], [0, 3, 4], [1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]`.
|
||||
|
||||
```js
|
||||
assert.deepEqual(combinations(testInput1[0], testInput1[1]), testOutput1);
|
||||
```
|
||||
|
||||
`combinations(4, 6)`应返回`[[0,1,2,3], [0,1,2,4], [0,1,2,5], [0,1,3,4], [0,1,3,5], [0,1,4,5], [0,2,3,4], [0,2,3,5], [0,2,4,5], [0,3,4,5], [1,2,3,4], [1,2,3,5], [1,2,4,5], [1,3,4,5], [2,3,4,5]]`
|
||||
`combinations(4, 6)` should return `[[0,1,2,3], [0,1,2,4], [0,1,2,5], [0,1,3,4], [0,1,3,5], [0,1,4,5], [0,2,3,4], [0,2,3,5], [0,2,4,5], [0,3,4,5], [1,2,3,4], [1,2,3,5], [1,2,4,5], [1,3,4,5], [2,3,4,5]]`
|
||||
|
||||
```js
|
||||
assert.deepEqual(combinations(testInput2[0], testInput2[1]), testOutput2);
|
||||
|
Reference in New Issue
Block a user