Skip to content

Commit 14f6d64

Browse files
committed
remove second part
1 parent 66b1cef commit 14f6d64

File tree

2 files changed

+4
-56
lines changed

2 files changed

+4
-56
lines changed

exercises/jigsaw-puzzle/canonical-data.json

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"rows": 25,
2121
"columns": 40,
2222
"aspectRatio": 1.6,
23-
"format": "portrait"
23+
"format": "landscape"
2424
}
2525
},
2626
{
@@ -60,24 +60,6 @@
6060
"format": "portrait"
6161
}
6262
},
63-
{
64-
"uuid": "2d910864-1388-11f0-9a22-145afc5ea279",
65-
"description": "puzzle globe with 81 pieces",
66-
"property": "jigsawData",
67-
"input": {
68-
"border": 0,
69-
"inside": 81
70-
},
71-
"expected": {
72-
"pieces": 81,
73-
"border": 0,
74-
"inside": 81,
75-
"rows": 9,
76-
"columns": 9,
77-
"aspectRatio": 1.0,
78-
"format": "globe"
79-
}
80-
},
8163
{
8264
"uuid": "32d6bfe1-1388-11f0-b268-145afc5ea279",
8365
"description": "puzzle with insufficient data",
@@ -102,33 +84,6 @@
10284
"expected": {
10385
"error": "Contradictory data"
10486
}
105-
},
106-
{
107-
"uuid": "42b3f426-1388-11f0-ab04-145afc5ea279",
108-
"description": "100 pieces configurations",
109-
"property": "jigsawConfigurations",
110-
"input": { "pieces": 100 },
111-
"expected": [
112-
{ "rows": 1, "columns": 100 },
113-
{ "rows": 2, "columns": 50 },
114-
{ "rows": 4, "columns": 25 },
115-
{ "rows": 5, "columns": 20 },
116-
{ "rows": 10, "columns": 10 },
117-
{ "rows": 20, "columns": 5 },
118-
{ "rows": 25, "columns": 4 },
119-
{ "rows": 50, "columns": 2 },
120-
{ "rows": 100, "columns": 1 }
121-
]
122-
},
123-
{
124-
"uuid": "4ad014ab-1388-11f0-8431-145afc5ea279",
125-
"description": "prime number of pieces",
126-
"property": "jigsawConfigurations",
127-
"input": { "pieces": 739 },
128-
"expected": [
129-
{ "rows": 1, "columns": 739 },
130-
{ "rows": 739, "columns": 1 }
131-
]
13287
}
13388
]
13489
}

exercises/jigsaw-puzzle/instructions.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,8 @@ The full information about the jigsaw puzzle contains the following parts:
88
- `rows`: Number of rows of pieces
99
- `columns`: Number of columns of pieces
1010
- `aspectRatio`: Aspect ratio of columns / rows
11-
- `format`: Puzzle format, which can be `portrait`, `square`, `landscape`, or `globe`
11+
- `format`: Puzzle format, which can be `portrait`, `square`, or `landscape`
1212

13-
For a puzzle in `globe` format, assume an aspect ratio of 1.0.
14-
15-
After a short while, your friend found out that entering the number of pieces, the number of border pieces and the format was the fastest way to get all the information for their collection catalogue with the least amount of manual work.
16-
17-
But your friend has grown tired of counting border pieces.
18-
To help with estimating the information of their puzzles, you should take the number of pieces and return all the possible numbers of rows and columns.
19-
20-
Start with the lowest number of rows and work your way up from there.
21-
While a single-row jigsaw puzzle might be a strange novelty, it is theoretically possible, so you should include this case.
13+
For the sake of the exercise, you may assume square pieces, so that the format can be derived from the aspect ratio.
14+
If it is lower than one, it is portrait, if exactly one, it is square and larger than one is landscape.
2215

0 commit comments

Comments
 (0)