34
A standard domino set has 28 unique pieces:
Given a list of 28 or fewer unique dominoes, output the list required to make a complete set.
Input and output dominoes are specified by two digits - the number of pips on each side of the domino, e.g. 00
, 34
, 40
, 66
.
The digits may be given in any order, so 34
is the same domino as 43
Example Inputs
00 01 02 03 04 05 06 11 12 13 14 15 16 22 23 24 25 26 33 34 35 36 44 45 46 55 56 66
00 10 11 20 21 22 30 31 32 33 40 41 42 43 44 50 51 52 53 54 55 60 61 62 63 64 65 66
00 01 02 03 04 05 06 11 12 13 14 15 16 22 23 24 25 26 34 35 36 44 45 46 55 56 66
00 02 03 04 05 06 11 13 14 15 16 22 24 25 26 33 35 36 44 46 55 66
<empty list>
Corresponding Example Outputs
<empty list>
<empty list>
33
01 12 23 34 45 56
00 01 02 03 04 05 06 11 12 13 14 15 16 22 23 24 25 26 33 34 35 36 44 45 46 55 56 66
2What input formats are allowed? Lists of strings? Lists of lists of integers? – Martin Ender – 2016-02-28T09:33:46.470
1@Martin I was assuming we have a meta consensus somewhere along the lines of "whatever list, array, set, collection, vector, matrix,... Is appropriate for your language. Members may be numbers or strings" – Digital Trauma – 2016-02-28T16:53:32.653
Does that mean that we can request each domino as a pair of integers, for example
03 16
=[0, 3], [1, 6]
? – FlipTack – 2017-12-29T11:49:53.7971@FlipTack Yes, of course – Digital Trauma – 2018-01-01T00:24:42.087