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.
AFAIK, it's because i64 implements the trait Ord, which contains those methods.
Although it is said there will be no empty array in instruction, for general use cases If the array is empty, this will panic compiler.
Wouldn't that potentially lose numbers and be hard to debug? I personally would use
.expect()
so that I know my assumptions are wrong. Probably unnecessary but it would be easier if I ever misread the question.It's dereferencing the result of .unwrap()
Checkout my solution XD (critics are welcome)
from description: "Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an integral number." -> so I wouldn't worry about it, just as author wants us to :)
It is best practice to not ignore the error return value. See other solutions for some ways to respond to an error.
Noooo! I can't believe
Compiler told me to dereference 'arr' by adding the *. Don't understand why yet...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
floating points
This comment is hidden because it contains spoiler information about the solution