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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You don`t need: double num = 0
TryParse can do it: double.TryParse(a, out double num);
string.Concat in this case is more efficient.
Thank you. I misunderstood the condition.
So strange. I actually just submitted my solution a few times out of frustration and it suddenly passed. I guess the random error generator generated just the right conditions. :) But I was able to look at some of the other solutions and see that I was pretty close. I just need to learn to optimize my code.
Nothing is hidden, that doesn't take ten minutes, only two.
Clarification is required for the condition. There is a hidden condition that the return route is different. Therefore, if there is a step forward and a step back, then it gives an error. Although according to the condition of the problem it is true, they took two steps and turned back in time!
This comment is hidden because it contains spoiler information about the solution
A little late, but others may need it. The cycle is not limited and can theoretically go on forever. Recursion is stack bounded. Also, the ternary operator has its own overhead costs, although they can rarely amount to a significant amount. Also, recursion in C# is not optimized in the same way as tail recursion, unlike some other languages, and it can consume significantly more resources than a loop. But this all applies to a very large number of iterations with large volumes of data. In other cases, it's all holy wars.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Use Pattern Matching in Switch Expressions for shorter code and better readable, like in my solution.
https://www.thomasclaudiushuber.com/2021/02/25/c-9-0-pattern-matching-in-switch-expressions/
It is in such a task that there will be no overflow, rather an overflow of the Long type will occur when multiplying large numbers.
Wouldn't that be a terrible system load? That number of nested loops? it seems more than two nested loops is already bad ...
Loading more items...