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.
Just a heads up, the default case is for those wild, unexpected situations, not when you're too lazy to add the last case.
The most concise version!
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();
This comment is hidden because it contains spoiler information about the solution
sadly, this is not tail recursive, as the last operation is the multiplication, not the recursion. Potentially, this might cause a stack overflow, even though you should hit the integer overflow first.
This is a fine non-recursive solution. There is however some duplication in the methods that can be removed.
i was wondering about using a LINQ ; but yeah Regex does the work
Yes! Very nice!
Using for instead of foreach would add additional performance (foreach is quite slow in comparison to for).
This comment is hidden because it contains spoiler information about the solution
Don't worry. I never write the code for a full application. So .. ;-)
Most of your solutions seems to fall into the "Clever" category.
It would be extremely hard to understand the code for a full application written this way.
This comment is hidden because it contains spoiler information about the solution
Loading more items...