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.
Well you don't have to mention that there is more than one building in the world, but it would be helpfull to know there is more than one building in the radar image. From the details this is not clear, and it's not logical either. I mean, if I want to know if there's a burglar in my house, it's useless to view the camera images of my neighour's house. So why should Potus be looking at all the buidlings in the world, if he wants to know whether he's alone in the White House? The programming solution can be quite different for one house than it is for two or more houses. So to avoid disappointment of future candidates, you could consider mentioning this fact or add a test case from which this is clear.
The details of this Kata talk about Potus begin in the White Houuse (single building). During the tests, it appeared that Potus can be in one building and an elf in another building (so two buildings). This drove me to a complete differenct approach for the solution. Suggestion: Update the details and mention the fact that there can be multiple buildings.
From the solutions I learn that an empty array is considered an onion array. This souds strange to me. Also arrays with an even number of elements are considered valid onion arrays whilst the tests/examples only show arrays with an odd nunmber of elements.
To me this solution (and others alike) are the best. They are the only ones that cover the following case:
"10 shots and 2 beer". Most solutions give 3 (1 + 0 + 2) instead of 12 (10 + 2) as the result.
This solution doesn't cover the following case:
"10 shots and 2 beer". The result is 3 (1 + 0 + 2) instead of 12 (10 + 2).
This solution doesn't cover the following case:
"10 shots and 2 beer". The result is 3 (1 + 0 + 2) instead of 12 (10 + 2).