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.
What actually happens when you don't provide a default label?
Very nice brevity and presentation
That's ok
Ah ok I see.
IterTools.step
is depricated, so one should usestd.step.by()
instead, and then no imports are needed.I just retested, removing
extern crate itertools
is possible, but if I removeuse itertools::Itertools;
I get the error:I would guess that when the solution was made
extern crate itertools;
was nessesary. Rust 2018 removed the need forextern crate
in a lot of cases.Thanks for the comment!
You have the ability to refactor before, and to fork after submitting :)
Doesn't need itertools. I'm guessing you just forgot to remove it. It's too bad CodeWars doesn't let us edit our solutions
A perfect and classy solution.
I love how declarative this solution is.
This code will not return 0 on empty array
Not sure if I am blind. But does this code return first index that satisfies (left == right) or does it return the lowest index that satisfies that condition.
Very good o(n) solution!
Please check this code for input {any two random values} and length (2).
I think it won't work fine as such test case is not in the provided test cases so your code passed test.