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.
Same. I've attempted several problems on here to find that I pass all the test cases but when I do the "submit" tests it fails. Just really frustrating and at a point I just move on from the kata.
As a CodeWarrior I dislike it when "submit" tests completely hide what is tested and then catch you by surprise as you muddle through failed special case after failed special case -- this often turns what seemed like straight-forward and simple problem into a drawn out and unncessarily complex experience. I also dislike it when a kata has "tricky" tests in the submit-tests but address it by burying the details in in text of the "details" section. My approach to deal with these issues for this Kata was to provide commented approaches with a second comment about the problem with that particular implementation. My approach gives both a hint on what the "submit" tests will enforce while educating on why that approach is bad. edit fixes double-mention about flaw comments
MinBy is an eager LINQ operator -- meaning it immediately determines its result. For another challenge of implementing a different kind of LINQ operator you might try my SelectConsective kata.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Check the docs what are parameters of
Enumerable.Range
. I also got tripped by this once.Log
Low: 8, High: 97
Test Failed
Expected is <System.Int32[90]>, actual is <System.Int32[97]>
Values differ at index [90]
Extra: < 9604, 9801, 10000... >
What kind of error?
Your range isn't really correct, try to look at error messages to see why.
why doesn't my statement work for the square function? It works for the samples fine but when I run the attempt it always gives an error.
var result = Enumerable.Range(start, end).Select(x => x * x).ToArray();
I came to the comments solely to make sense of the parameters given since they were so poorly written. Thanks for elaborating on them.