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
oof
i'm deceased
You should think for yourself, not in my place.
This code doesn't follow typical styling, which would have the line broken into a couple new lines and helps dramatically with readability. I think some believe one-liners look cooler.
I understand that
xs.len()
is said to be>=3
and Rust has some underflow protection.Yet still
xs.len() - 1
is a buggy programing practice I don't that makes me nervous.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How did you solve problem?
This comment is hidden because it contains spoiler information about the solution
Really clean.
I've finally read that I had to round results, but test cases for C++ showing me:
One could tinker with
TC_COUNT
andRANGE
constants in “Test Cases” section.Interesting configurations include:
TC_COUNT
= 0,RANGE
= 0..=1000 which would enforce 0 randomness and covering literally all cases that abide by specification._
is NOT unreachable. It can be reached due to misuse of the provided function.This match arm should panic with clear message targeting API user who misused the function.
This comment is hidden because it contains spoiler information about the solution
Loading more items...