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.
I don't know if it would add any value, but if you say it should only work for numbers n <= 40, should there be a test case to assert something along the lines of "does not attempt to find smallest(41)".
It's nice to have a solution that can go higher, but if I assume there's some reason I shouldn't execute these operations on n > 40, then maybe my code should enforce that. I half expected to see that sort of test case when I started the kata. Whatcha think?
I don't know if it would add any value, but if you say it should only work for numbers n <= 40, should there be a test case to assert something along the lines of "does not attempt to find smallest(41)".
It's nice to have a solution that can go higher, but if I assume there's some reason I shouldn't execute these operations on n > 40, then maybe my code should enforce that. I half expected to see that sort of test case when I started the kata.
You don't need to pass a block in... I mean that the ampersand is not necessary.
This comment is hidden because it contains spoiler information about the solution