8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4d6fed commit de46071Copy full SHA for de46071
Backtracking/tests/AllCombinationsOfSizeK.test.js
@@ -1,18 +1,16 @@
1
-import { Combinations } from '../AllCombinationsOfSizeK'
+import { generateCombinations } from '../AllCombinationsOfSizeK'
2
3
describe('AllCombinationsOfSizeK', () => {
4
it('should return 3x2 matrix solution for n = 3 and k = 2', () => {
5
- const test1 = new Combinations(3, 2)
6
- expect(test1.findCombinations()).toEqual([
+ expect(generateCombinations(3,2)).toEqual([
7
[1, 2],
8
[1, 3],
9
[2, 3]
10
])
11
})
12
13
it('should return 6x2 matrix solution for n = 4 and k = 2', () => {
14
- const test2 = new Combinations(4, 2)
15
- expect(test2.findCombinations()).toEqual([
+ expect(generateCombinations(4,2)).toEqual([
16
17
18
[1, 4],
0 commit comments