|
3 | 3 | "description": "returns prime factors for the given input number",
|
4 | 4 | "cases": [
|
5 | 5 | {
|
6 |
| - "description" : "returns no prime factors for 1", |
| 6 | + "description" : "no factors", |
7 | 7 | "input" : 1,
|
8 | 8 | "expected" : []
|
9 | 9 | },
|
10 | 10 | {
|
11 |
| - "description" : "returns [2] as the prime factors for 2", |
| 11 | + "description" : "prime number", |
12 | 12 | "input" : 2,
|
13 | 13 | "expected" : [2]
|
14 | 14 | },
|
15 | 15 | {
|
16 |
| - "description" : "returns [3] as the prime factors for 3", |
17 |
| - "input" : 3, |
18 |
| - "expected" : [3] |
19 |
| - }, |
20 |
| - { |
21 |
| - "description" : "returns [2,2] as the prime factors for 4", |
22 |
| - "input" : 4, |
23 |
| - "expected" : [2, 2] |
24 |
| - }, |
25 |
| - { |
26 |
| - "description" : "returns [2,3] as the prime factors for 6", |
27 |
| - "input" : 6, |
28 |
| - "expected" : [2, 3] |
29 |
| - }, |
30 |
| - { |
31 |
| - "description" : "returns [2,2,2] as the prime factors for 8", |
32 |
| - "input" : 8, |
33 |
| - "expected" : [2, 2, 2] |
34 |
| - }, |
35 |
| - { |
36 |
| - "description" : "returns [3,3] as the prime factors for 9", |
| 16 | + "description" : "square of a prime", |
37 | 17 | "input" : 9,
|
38 | 18 | "expected" : [3, 3]
|
39 | 19 | },
|
40 | 20 | {
|
41 |
| - "description" : "returns [3,3,3] as the prime factors for 27", |
42 |
| - "input" : 27, |
43 |
| - "expected" : [3, 3, 3] |
| 21 | + "description" : "cube of a prime", |
| 22 | + "input" : 8, |
| 23 | + "expected" : [2, 2, 2] |
44 | 24 | },
|
45 | 25 | {
|
46 |
| - "description" : "returns [5,5,5,5] as the prime factors for 625", |
47 |
| - "input" : 625, |
48 |
| - "expected" : [5, 5, 5, 5] |
| 26 | + "description" : "product of primes and non-primes", |
| 27 | + "input" : 12, |
| 28 | + "expected" : [2, 2, 3] |
49 | 29 | },
|
50 | 30 | {
|
51 |
| - "description" : "returns [5, 17, 23, 461] as the prime factors for 901255", |
| 31 | + "description" : "product of primes", |
52 | 32 | "input" : 901255,
|
53 | 33 | "expected" : [5, 17, 23, 461]
|
54 | 34 | },
|
55 | 35 | {
|
56 |
| - "description" : "returns [11, 9539, 894119] as the prime factors for 93819012551", |
| 36 | + "description" : "factors include a large prime", |
57 | 37 | "input" : 93819012551,
|
58 | 38 | "expected" : [11, 9539, 894119]
|
59 | 39 | }
|
|
0 commit comments