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.
There are no test cases for C# before submission. I made my cases in Visual Studio with small, VERY large (38 characters long each), and two strings of differing lengths, and everything passed. I tried submitting, and each one of the tests here failed without telling me what the inputs were.
Agreed. I found this way too straight forward.
Your answer could eliminate a bunch of those variables. Keep it simpler, and easier to read. Plus, you can change your return to a single statment of just what is inside your if.
Great idea though!
A string is already a character array by definition. You don't need to cast it with ToCharArray() to use Linq operations on it.
You don't need to convert your switch cases to explicit boolean values. You already have them.
I'm getting an ArguementOutOfRangeException which appears to be overflowing an int, which doesn't make any sense unless it was set up incorrectly.
This comment is hidden because it contains spoiler information about the solution
You also need to translate the example to C#. The example in the description doesn't show up.
Is there any way to get that language pulled from the list, or fixed?
I've been wondering that about every Kata that I've seen on here.
The square Japanese ones do.
Excellent. Thanks. Kind of an odd problem, especially with it hidden away like that.
This comment is hidden because it contains spoiler information about the solution
As a heads up, you should store your counter.Count() in a variable to save from having to recalculate that 3 times every time through the loop. Not a huge deal in a situation like this where it's only 6 times with an array of length 5, but in larger situations that could cause a bottleneck.
I tried the C# version of this, and I'm repeatedly getting an exception thrown with every one of the calls saying that the key is not found. I copied my code into Visual Studio with the dictionary being a private variable in my test class, and it ran perfectly.
I have a feeling there's a disconnect and that dictionary needs to be made static on a class so we're able to access it from our test code.
Loading more items...