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.
When expecting non-null (
!
null forgiving) you can useFirst()
instead ofFirstOrDefault()
. That expects at least one element in the enumeration, and won't return a null-default-type. (Consequential difference: If it were null with!
it would throw aNullReferenceException
, withFirst()
it would throw aInvalidOperationException
.)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
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
Given the variance in solutions I don't think it's that/completely pointless.
People who don't know or recognize that a sleep can be used can learn about that. It's certainly different to a busy-wait.
And the solutions are certainly varied, which can be interesting to look through - but is/should maybe not the goal of a kata.
If you want responses or help, you need to give a bit more than that. What do you not understand? What did you try? What do you want told?
The kata description tells you what the goal is.
It's not necessarily obvious the 7000 is in ms. The code could alternatively be explicit/obvious about that.
I wonder whether and/or how much faster integer operations with a list are in this case compared to formatting it to a string and splitting and parsing the string.
This comment is hidden because it contains spoiler information about the solution
Loading more items...