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.
A testcase could be n = 4000, m = 4000, which will evaluate to -96 in i16
An excellent point. Though for the scope of the problem it would hardly matter.
nice one
Why did you clone the array iterator ?
Could you explain?
I think the main reason that I love Rust so much is that it's actually logical and functional in ways that were either very gated or very difficult to achieve beforehand. It comes with a lot of different methods and options for extreme method chaining, like above, but it's still understandable. For example, that Either crate? Yeah, with no additional help, I wrote my own implementation of it where it had three different possible branches, and it's just as concise as the original. Most other languages would have you start from scratch or adhere to some syntactic requirements, but Rust actually guides you to the results.
Wonderful. The short code works miraculously.
Thanks! I just started learning Rust, but I already notice how the way I write code changes from "let's write a bunch of code" to "there should already be something for this task":)
Nice! I didn't realize that this "Either" thingy was an actual rust crate. I just figured the implementation was hidden in the kata code somewhere.