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 spent more time on the output formating than getting the books count, and I was not expecting that at all.
Learned quite a bunch while doing so but that was surprising (to be honest I also did not managed the order in my first draft).
Nice kata otherwise.
This comment is hidden because it contains spoiler information about the solution
Can anyone explain how this works? I know what a partial function is (basically prefilling some of the args), but how is it used here?
What is an argument for using the partial syntax instead of simply reduce?
As for me this is very simple kata (when I read requirements for each kyu I choosed 4 kyu). And this is very-very interestingkata. And I want intermediate version of kata (with allmost all support of SQL Select version). And I want advanced version of this Kata with support of INSERT/UPDATE and table indexes (so code that doesn't uses indexes will got timeout).
Thanks for kata!
If I were to change the rules, I would invalidate the solutions of 211 codewarriors. If you want to play a game, you have to accept the rules... Sorry for that!
Almost 40 Codewarriors succeeded in C# without problems so it can't be an issue for the kata.
It can be a Codewars site error, it happens when too busy.
You pass into my function a list of categories. And there is a requirement to return collection with category->count (event if count is zero). I must add a special condition to meet with requirement 'when books are empty return empty collection'.
So I suggest you to remove this requirement. If list of books is empty then we must return collection with all specified categories (and count = 0)
for c# running tests or submitting gives "unexpected eof" while the code runs just fine (including type of return) in real IDE.
What do you want to return?!
It's very bad that you require that: if books or categories are empty return empty collection. Please, remove this requirement