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
Rust translation!
Still, one of sentences suggests the stronger requirement: "[...] find out whether the cuboid has equal sides (= is a cube)".
EDIT: okay I see you updated it.
It doesn't say if it is a cube it says if it could be:
And that has already been mentioned here: https://www.codewars.com/kata/58d248c7012397a81800005c/discuss#642de3f56555a387e8795e45
Anyways, I've changed the description to replace
has
and=
forcould have
andcould be
.This comment is hidden because it contains spoiler information about the solution
And All stops after the first mismatch. Both perform the same here.
The point is that it's bad practice to mutate input. Undocumented side effects like that are hell on readability.
This comment is hidden because it contains spoiler information about the solution
Using Linq is adhering to KISS. Yes Linq has performance issues (though often overstated and it does get better with each iteration of .Net) but in 99% of use cases Linq won't be your performance bottleneck and if it is then you can just not use it in those cases.
The advantage of Linq is easier to write/read code. It is far more concise without losing any readability (assuming everyone is passingly familiar with the syntax).