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.
Clever and short solution, but I wouldn't call this "best practice" due to the added cost of error catching and it being a little hard to parse what it's doing.
Unfortunately I dont see an easy way of not allowing building up a new rotated matrix and then replacing the original one unless we replace the data structure to some custom Matrix object.
I allowed contributors if you want to add it yourself to this kata.
This code should have worked (works in console), but an error is returned: "Object 2 has no method add". Something is wrong with the real inputs to this kata.
Try reordering the key-value pairs in the hashes so people can't just do hash.values[0] and hash.values[1] to get the right place/capital.
Oh I see, what you're saying. I'll update the test to make sure the input data is changed.
Can you elaborate what you mean by "while even without change of input value (matrix value), the output is marked as correct"? I don't know how I would check that the user only modified the existing matrix instead of creating a new one. The way I wrote this kata assumes a bit of an honor code.
Map and zip return a different list from the original one.
Building a new matrix is cheating! ;)
you also cheated! ;)
Very cool and thoughtful solution, I like how extendible this solution is.
my solution was very similar, but I like the how yours is more readable.
Oops, yea thanks for pointing that out!
This is cheating the kata instructions, BTW. ;)
Sure, you can use a couple of scalar variables (to avoid finding the length of the matrix multiple times, for example).
Loading more items...