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 want to be annoyed by this answer, but using only one collection for the test verification is just so lazy.
I don't remember other kata on codewars where you can have a method return a single integer and pass all tests.
I do hope comment art doesn't become "a thing" in general on this site.
Sure, Enumerable.Range is the reasonable choice, but then you are losing at code golf by 7 characters.
Instantiating an array and using the index from a select override only takes twice as long to run through the test cases.
It's easier to win at code golf when nobody else knows they are playing.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks for the complements! I actually use the IPAddress class for work fairly regularly. Codewars is where I tend to write rediculous one liner linq answers just for fun.
The Kata description says "returns the number of addresses between them (including the first one, excluding the last one)"
That is why 50 is the correct answer.
C# 8.0 in the wild
Nice use of the new range operator.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Your solution is much easier to understand! Months later, this is true for me, even though I wrote my code...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...