You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/dominoes/instructions.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
-
# Description
1
+
# Instructions
2
2
3
3
Make a chain of dominoes.
4
4
5
-
Compute a way to order a given set of dominoes in such a way that they form a correct domino chain (the dots on one half of a stone match the dots on the neighboring half of an adjacent stone) and that dots on the halves of the stones which don't have a neighbor (the first and last stone) match each other.
5
+
Compute a way to order a given set of domino stones so that they form a correct domino chain.
6
+
In the chain, the dots on one half of a stone must match the dots on the neighboring half of an adjacent stone.
7
+
Additionally, the dots on the halves of the stones without neighbors (the first and last stone) must match each other.
6
8
7
9
For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something
8
10
like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same.
0 commit comments