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.
Really stupid mistake on my part - thank you!
Check your curly brackets.
When I submit my solution in Javascript, I get this message:
'Response received but no data was written to STDOUT or STDERR.'
Clearly I've missed something, but it's a most unhelpful message...
Jesus Christ, this was so annoying. So many random Cases, always had 1-10 out of 100 Test cases causing errors.
Random tests, Javascript:
Testing for an array of length = 7887
Wanted term (k) : 6949
Although the array has length 7887, this random test only has 6561 distinct values in the array. So it should output 'No way.'
I get this failure message:
'expected 'No way' to equal 'Valid entries: 'max' or 'min''
It's possible I've messed up somewhere, but this might be a mistake in the random tests - the value of k should be checked before the correctness of the string.
You're not just creating a model with this one - you are also choosing a model, and then testing data against it. Which makes it a bit more complex.
In Java, returning this as a string seems odd. It would be much more natural to return an ArrayList.