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.
or extract "pure" factorial method, which can be made recursive
Don't you create two string objects each iteration?
Then why is this best practice?
oh, yes :) thx, I got your point
How is that best if it runs through sequence twice?
Why is that best practice if in case of no #\R we still check if it is #\L
How is this clever or best practice?
There is string rebuilding in each loop. And the same string.
This is computationally intense, since you need to do the sum for each element
This solution is elegant and efficient at the same time
Why is it the best practice if there are 2 additions extra?
This comment is hidden because it contains spoiler information about the solution
Yes, you are right! I've recognized after I published it, and there is no way I can correct it. I simply calculated the perimeter and it had passed the tests.
Nice comment about the string concantination. And that is true, there is an error in this solution.
Another option is to put the "not" in the condition:
par.Any(!char.IsDigit) || score.Any(!char.IsDigit)
This comment is hidden because it contains spoiler information about the solution
look, your last argument is actually a variable, that calculates out of a, b, c. So, imo, this is better be in the body. And it is strictly defined in declaration part, so if I call it, say,
get_grade(a, b, c, any_other_value),
it will ruin the method. If we put 's' declaration in the body, method will be safe from making that kind of error.
This is wrong. For 89.01 it would return an "A"
Loading more items...