I have a problem, which I haven't found a solution for. Solutions to the first part are well documented, but I have yet to find anyone who has solved the second part. I call this the "Dobble" challenge...
Using the numbers 1 - 57, populate 57 arrays. Each array must have 8 numbers in it, with no duplicates. Each array must share one number (and only one number) with every other array. For example:
[3, 12, 18, 24, 30, 43, 49, 55]
[4, 13, 18, 23, 35, 40, 45, 57]
[7, 10, 19, 28, 30, 39, 48, 57]
The first array has
18 in common with second array and
30 in common with the third array.
This challenge has been posted before, and published solutions can easily be found and explained. But wait...
As an extension to the previous challenge, ensure that each of the numbers 1 - 57 are never in the same position twice, across all of the 57 arrays. For instance, the previous example contains
30 twice in the fifth position. Find a solution that avoids this.
This is my first code challenge, so please forgive any issues with the formatting/style - I'll try to correct errors if you mention them in the comments.