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.
Nothing is broken! 217 people did this kata without any problems.
So where is the concrete problem?
Yup. The number of bricks visible for an empty string is 0, not -1. One shouldn't have to set up counter-intuitive catches just to match arbitrary tests. Those tests, and this kata, are essentially broken.
And I would never write this in production code!
A simple refactoring into a helper function would make this much more digestible!
Alas, the "one-liner factor" was too appealing... :)
Count should not be -1 for an input of 0 size, it makes more sense for it to be 0. Other than that, it was fun to do. :)
Clever, but I would hate to see that in production code! :))