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.
I'll never understand the tempatation to fit your code into as small a space as possible at all costs. Why in the world would you omit white space between symbols and sacrifice performance just to have the most terse answer?
hard to read
Maybe you need to get more familiar with dealing with arrays, lists and collections functionally ;-)
Also there are ways to make it
O(n)
, so that's a separate problem.I'll grant that this is a clever use of LINQ to solve the problem. But this is both innefficient - O(n^2) - and hard to read. Using LINQ may make this brief, but it took me over a minute to parse what the code did whereas if it were written more verbosely without LINQ it would likely been quick to understand.
Like another commenter, when I run across code that looks like this, I have to use resharper to translate it to mortal speak. That is a strong smell that the code is not maintainable.
This comment is hidden because it contains spoiler information about the solution
That's some seriously weird looking code, and I'm reasonably sure it accepts a lot of inputs it shouldn't.
This comment is hidden because it contains spoiler information about the solution