Call to .ToCharArray() is unnecessary.
OK, I used a stack to solve the question, but this is much better since it requires only O(1) of extra space! Kudos!
I like the use of Func, makes the whole thing really concise. The only thing I don't like about this, is that you iterate through each array twice, where once would suffice.
I am trying to come up with a way to do that using "getMinMaxLength Func>", where you find the min and max in one iteration. I am not yet familiar enough with lambdas in C# to get it right without thinking longer about it. Do you know how?
Normally I don't like to do these kind of public shaming sessions, but sometimes it just has to be done.
Please learn to write proper and clean code and don't cause hassles to everyone else by writing faulty translations.
Ruby: The actual code limit is 4 lines, not 3.
Also the test used to require that the cards are in order.
I decided to release this requirement. It shouldn't affect the solution approach anyways.
Description is also horrible, which I've fixed (and properly applied the language-if blocks).
What are wrong in the tests:
I cleaned up the tests in all languages and added a basic test in the sample tests.
I also cleaned up the JS test fixture. That was a horribly ugly piece of code. Whoever wrote that should be ashamed of himself.
There are too many things wrong in the translations that I'm not going to write them out before fixing them.
So I'm going to fix them one by one as I write them out in the replies.
This comment is hidden because it contains spoiler information about the solution
oh, so you can resolve the issue of no sample tests!
FYI, both the best practices stub and the issue for discussing best practices indicate you should have sample tests and/or an example showing an expected input-output pair. Figuring out the FORM of an expected result should not be part of the puzzle. Older kata were published before the current use of the sample test window. Currently, a new kata or translation should always include a sample test.