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.
If compiler produce a binary and the binary works, that's clearly legal.
But, as you don't put parenthesis on a variable, it's better to use Invoke() to clarify the context.
I appreciate this, but the Kata is implemented using a dictionary in almost every language. C# has a dictionary class, so using arrays of tuples instead is a less faithful translation of the original. Plus, the array's search method will throw, which is more burden on the solver. And despite this not being a performance Kata, why would you unnecessarily take an O(n) problem and make it O(nm) just to use 2 less namespaces?
Fork approved by someone
OMG corrected to match the
Basic_Test
!!!1!sorry about that oversight, should be good now
EDIT: also just corrected one output specifier...
great, looks good to me now
I went with that because the input will never be below 0 and the output should only be 1, 2, or 3. (this test suite had accommodated that, even if the result of the hit would be below zero). I changed to
int
for this translation to comply so a user could return a negative number.why unsigned? other languages allow to go below 0.
And the description reenforces this.
You should use a chai (https://www.chaijs.com/api/assert/) assert isNumber, perhaps you can also play around with isNotNaN and other methods.
I removed a piece of code that is from the JavaScript translation. (it's commented out to see what it was) Removing it alters the outcome. Would you please re-check the code now with the same metric you used before?
This isn't possible in any current version of C#.
2^31 = 2147483648
(DateTime.MaxValue - DateTime.MinValue).TotalDays = 3652059 (less than 2^31)
cycleLength is int, which has a max value of 2147483647 (less than 2^31)
There is no possible way to pass this method values that will cause the error you describe.
My mistake. I used the Python description as a reference. It's already corrected. Thanks for pointing that out.
probably :-)
let's forget about this one
Yeah, ain't it a bit harsh for 7kyu? :D
This comment is hidden because it contains spoiler information about the solution
Did they add this recently? I can't seem to find any info about it.
Loading more items...