Skip to content

Commit 1bb097d

Browse files
committedMay 16, 2020
chore(docs): add comments

File tree

6 files changed

+7797
-10970
lines changed

6 files changed

+7797
-10970
lines changed
 

‎CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Just as in the **subject**, use the imperative, present tense: "change" not "cha
165165
The body should include the motivation for the change and contrast this with previous behavior.
166166

167167
### Footer
168-
The footer should contain any information about **Breaking Changes** and is also the place to
168+
The footer should contain any information about **BREAKING CHANGES** and is also the place to
169169
reference GitHub issues that this commit **Closes**.
170170

171171
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*eslint-disable */
2+
3+
function reverse (arr, i, j) {
4+
while (i < j) {
5+
[arr[i], arr[j]] = [arr[j], arr[i]];
6+
i++;
7+
j--;
8+
}
9+
}
10+
11+
function backtracking(array, start = 0) {
12+
let permutations = [array];
13+
14+
for (let i = start; i < array.length - 1; i++) {
15+
for (let j = i + 1; j < array.length; j++) {
16+
reverse(array, i, j);
17+
permutations = permutations.concat(backtracking(array, i + 1));
18+
reverse(array, i, j);
19+
}
20+
}
21+
22+
return permutations;
23+
}
24+
25+
function minPermutations(arr) {
26+
return backtracking(arr);
27+
}
28+
29+
module.exports = minPermutations;
30+
31+
//*/
32+
// console.log(backtracking([1,2,3]));
33+
// console.log(backtracking([1,2,3,4]));
34+
//*/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fn = require('./min-permutations');
2+
3+
describe('Min Permutations', () => {
4+
it('should work', () => {
5+
expect(fn([1,2,3])).toEqual();
6+
});
7+
});

‎package-lock.json

Lines changed: 7733 additions & 10912 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 21 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -36,62 +36,41 @@
3636
"@semantic-release/git": "^9.0.0",
3737
"benchmark": "2.1.4",
3838
"braces": ">=2.3.1",
39-
"commitizen": "^4.0.3",
40-
"conventional-changelog-cli": "^2.0.31",
41-
"cz-conventional-changelog": "^3.1.0",
42-
"cz-emoji": "github:amejiarosario/cz-emoji",
43-
"eslint": "6.8.0",
39+
"commitizen": "4.1.2",
40+
"conventional-changelog-cli": "2.0.34",
41+
"cz-conventional-changelog": "3.2.0",
42+
"eslint": "7.0.0",
4443
"eslint-config-airbnb-base": "14.1.0",
4544
"eslint-plugin-import": "2.20.2",
46-
"eslint-plugin-jest": "23.8.2",
45+
"eslint-plugin-jest": "23.11.0",
4746
"handlebars": "4.7.6",
48-
"husky": "^4.2.3",
49-
"jest": "25.2.7",
47+
"husky": "4.2.5",
48+
"jest": "26.0.1",
5049
"js-yaml": ">=3.13.1",
51-
"mem": "6.0.1",
52-
"semantic-release": "^17.0.4",
50+
"mem": "6.1.0",
51+
"semantic-release": "17.0.7",
5352
"textlint-plugin-asciidoctor": "1.0.3"
5453
},
5554
"engines": {
5655
"node": ">=12.5.0"
5756
},
5857
"config": {
5958
"commitizen": {
60-
"path": "cz-emoji"
61-
},
62-
"cz-emoji": {
63-
"types": [
64-
{
65-
"emoji": "🐛",
66-
"code": ":bug: fix",
67-
"description": "Fixing a bug on code.",
68-
"name": "fix code"
69-
},
70-
{
71-
"emoji": "📝",
72-
"code": ":pencil: fix",
73-
"description": "Fixing typos on book.",
74-
"name": "fix typo"
75-
},
76-
{
77-
"emoji": "",
78-
"code": ":sparkles: feat",
59+
"path": "cz-conventional-changelog",
60+
"types": {
61+
"feat": {
7962
"description": "Introducing new features on code and/or book.",
80-
"name": "feature"
63+
"title": "Features ✨"
8164
},
82-
{
83-
"emoji": "💥",
84-
"code": ":boom: break",
85-
"description": "Introducing breaking changes.",
86-
"name": "breaking"
65+
"fix": {
66+
"description": "Fixing a bug on code or book",
67+
"title": "Bug Fixes 🐛"
8768
},
88-
{
89-
"emoji": "🔩",
90-
"code": ":wrench: chore",
91-
"description": "Adding CI/build tools.",
92-
"name": "chore"
69+
"chore": {
70+
"description": "Other changes that don't modify code or book files",
71+
"title": "Chores 🔩"
9372
}
94-
]
73+
}
9574
}
9675
},
9776
"husky": {
@@ -103,21 +82,7 @@
10382
"tagFormat": "${version}",
10483
"branch": "master",
10584
"plugins": [
106-
["@semantic-release/commit-analyzer", {
107-
"preset": "angular",
108-
"releaseRules": [
109-
{"type": "fix", "release": "patch"},
110-
{"type": "feat", "release": "minor"},
111-
{"type": "break", "release": "major"},
112-
{"header": ":bug:*", "release": "patch"},
113-
{"header": ":pencil:*", "release": "patch"},
114-
{"header": ":sparkles:*", "release": "minor"},
115-
{"header": ":boom:*", "release": "major"}
116-
],
117-
"parserOpts": {
118-
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
119-
}
120-
}],
85+
"@semantic-release/commit-analyzer",
12186
"@semantic-release/release-notes-generator",
12287
"@semantic-release/changelog",
12388
"@semantic-release/github",

‎src/data-structures/maps/hash-maps/hash-map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class HashMap {
252252
}
253253

254254
/**
255-
* the same function object as the initial value of the `entries` method.
255+
* The same function object as the initial value of the `entries` method.
256256
* Contains the [key, value] pairs for each element in the Map.
257257
*/
258258
* [Symbol.iterator]() {

0 commit comments

Comments
 (0)
Please sign in to comment.