Skip to content

Commit cbef253

Browse files
committed
feat/ change exercise to permutations
1 parent a64b174 commit cbef253

File tree

7 files changed

+23
-26
lines changed

7 files changed

+23
-26
lines changed

16_permutations/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Exercise 16 - permutations
2+
3+
Write a function that takes in an input array and returns an array of all possible permutations of the array
4+
5+
```javascript
6+
permutations([1,2,3]); // [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
7+
```

16_permutations/permutations.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const permutations = function() {
2+
3+
};
4+
5+
// Do not edit below this line
6+
module.exports = permutations;
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const sumSquares = require('./sumSquares');
1+
const permutations = require('./permutations');
22

3-
describe('sumSquares', () => {
3+
describe('permutations', () => {
44
test('First test description', () => {
55
// Replace this comment with any other necessary code, and update the expect line as necessary
66

7-
expect(sumSquares()).toBe('');
7+
expect(permutations()).toBe('');
88
});
99

1010
test.skip('Second test description', () => {
1111
// Replace this comment with any other necessary code, and update the expect line as necessary
1212

13-
expect(sumSquares()).toBe('');
13+
expect(permutations()).toBe('');
1414
});
1515
});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const sumSquares = function() {
1+
const permutations = function() {
22
// Replace this comment with the solution code
33
};
44

55
// Do not edit below this line
6-
module.exports = sumSquares;
6+
module.exports = permutations;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const sumSquares = require('./sumSquares-solution');
1+
const permutations = require('./permutations-solution');
22

3-
describe('sumSquares', () => {
3+
describe('permutations', () => {
44
test('First test description', () => {
55
// Replace this comment with any other necessary code, and update the expect line as necessary
66

7-
expect(sumSquares()).toBe('');
7+
expect(permutations()).toBe('');
88
});
99

1010
test('Second test description', () => {
1111
// Replace this comment with any other necessary code, and update the expect line as necessary
1212

13-
expect(sumSquares()).toBe('');
13+
expect(permutations()).toBe('');
1414
});
1515
});

16_sumSquares/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

16_sumSquares/sumSquares.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)