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.
It's implied by the
4kyu
ranking?I can use stoi.
For this you don't have to include anything. Just put the "std::" in front of it and don't forget to give the right params (see here: http://www.cplusplus.com/reference/string/stoi/).
Great, what to do in C++?
Using map always orders the keys by alphabet, unordered_map ignores the order of the category list.
If using BigInteger is forbidden, you should say so in the description.
You need to create your classes in a different Assembly from the SomeClass you see in the test, also, the test could try to define the same classe twice so you still need to check if it exists or not (but only in your assembly).
If I misunderstood what you meant please show me your code under spoiler so I can help you further.
At least the first class of the test is already defined in the 'test' assembly. If I remove the check, I get an InvalidOperationException at the class with a random number in the name, stating that it is already defined in another assembly.
Is this a bug?
It's not a question of liking the kata. The purpose of codewars shouldn't be teaching us bad coding practices.
You haven't read the Kata best practices as well. They exist for a reason.
Edit: You should stop marking issues as solved when they aren't. I mean, you ask what the author of the issue means and flag the issue resolved at the same time. That not only shows that you don't give a f... about what people think, it is also disrespectful and rude.
Same here, I get the following error:
(len = 15)
Expected different result:
Expected string length 763 but was 882. Strings differ at index 21.
Expected: "Lorem-----ipsum\ndolor\nsit\namet,\nconsectetur\nadipiscing\nelit.\n..."
But was: "Lorem-----ipsum\ndolor-------sit\namet,\nconsectetur\nadipiscing\n..."
---------------------------------^
Edit: Don't blame me for this broken editor. I even inserted br-tags, which aren't ignored in preview...
Edit2: I see now that this issue has been posted multiple times before.
An empty array in C# is achieved with e.g. "new int[0]".
If you can't change the testing suite you should change the description to something like "if n==0, then return an array of length 1, containing only a 0".
C#