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.
I did the same, but what if
n = 2_147_483_647
?i forgot to change the panic!() to something else.. my retardness is too powerful
it panics anyway if the index is out of bound, so why repeat the
Yes i know, but i chose .copied() because i hate the aesthetics of the * operator
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The first check should be first.len() != second.len(). Otherwise, the answer may be wrong.
E.g.,
first = "a"
second = "aa"
The answer should be None instead of 0.
It should panic, according to the description that's an invalid input.
If you enter 11 the code will panic. I don't think this is a "best practice."