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 is something wrong with the C# random tests. It expects False when the sentence is "Mibed cecx?" and characters are {'M','b','c','e','d','x','i','?','e','c'} yet this should be True.
Agreed, make a simple solution for this kata.
Find out the test case is not fits the description.
Add some logic to pass that. Then the solution looks worse.
have c# random tests been sabotaged?
Assert.That(Kata.MakesTheSentence(new List { 'j', 'm', 'j', 'f', 'd', 'c', 'n', '!', 't', 'I', 'u', 'b', 'k', 'y', 'n', 'e', 'm', 'l', 'k', 'e', 'x', 'j', 'p', 't', 'b', 'q', 'z', 't', 'd', 't', 'q', 'y', 'g', 'u', 'f', 'p', 'e', 'y', 'l', 'x', 'p', 'h', 'v', 'v', 'k', 'z', 'f', 'x' }, "Iftpyucn mpvxf ebfhdnj mgujqlkz eydtxez qpbkyv jttxlk!"), Is.EqualTo(false));
False? really? How is that?
This comment is hidden because it contains spoiler information about the solution
In at least one of the tests, a digit is passed in as part of the list of characters. Possibly in the sentence as well. I ended up having to add a test to filter out digits in order to get my solution to be accepted. And the way the description is written, it sounds like an invariant that the characters and sentences will only contain the approved characters, or at least makes no mention of how we should handle it if unapproved characters like digits appear.
The description should mention explicitly that all char in the input array have to be used: this imply a possible easier solution than checking if there are enough chars to make the sentence (and only when submitting we notice that we have to also check if there's no char remaining, adding it rather to rethink an easier and shorter solution ^^)
.
This comment is hidden because it contains spoiler information about the solution
Published translations for C, C++, and Java. Please review.
Added random tests to JavaScript as well as more descriptive feedback.
Made test case consistent with description in JavaScript and C#.
!
Considering it's functionally the same as your solution, I agree xD
Too obvious
Loading more items...