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 Rust is okay with it, the math must be correct. Perhaps we've entered another dimension?
This comment is hidden because it contains spoiler information about the solution
can someone explain it?
One of the best!
damn i need to learn lambas
Wish I knew this earlier
One suggestion I have is to start off by initializing
return_vector
likeVec::with_capacity(height * (height + 1) / 2)
. This way, you can avoid unnecessary allocations. From what I gather, in your situation, Rust reallocates with everypush()
operation you perform.I've been checking out other solutions, and yours seems to be the most concise. Thanks!
But this solution does not account for negative values... 🤔
Python...every pythost has it own original 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
Most readable solution! Good code.
I had the same code as the owner of this post. Thank you for noticing this loophole. I think it was not considered by the creator of the Kata when the checker was coded.
Your code us clear. But I think the program description is the result larger than 140. The input is not. Since the input contains many spaces , the input is always larger than the result. So , although input is larger than 140 , the result may not larger than 140. So , your code does not work welll if the input is larger than 140 while the result is not.
Loading more items...