Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There are situations where the sums of the elements of a row/col/square could be 45, but the numbers to reach 45 are not unique (2,2,2,4,5,6,7,8,9). For some reson my first thought is that these would slip through on squares the easiest.
Going to come back to this and think on how these might impact efficency:
1- using transpose on line 2
2- checking rows and cols for uniqueness first, then regions- rather than all at once as is
This comment is hidden because it contains spoiler information about the solution
WHile this obviously works, I think the point of the excercise was to rebuild this built-in method yourself
The random tests do not work (in ruby). All expected results are nil, when there are obvious answers.