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.
method chain was nice!
Why?
I don't think there ever will be RE in rust::std considering there is a really good crate for that.
It's sad there is no regexp in Rust::std yet...
Thanks for the feedback, and for taking the time to complete it !
You are right, I have updated the description.
If you enjoyed it, I also have the following kata in the same vein: https://www.codewars.com/kata/58599c35994864e9ee00017f
Nice compact solution by the way.
Very enjoyable kata!
One thing to note though, in the description you say that "one can place in 8 different ways 1 King, 1 Rook and 2 Knights on a 4 x 3 chessboard", however it should be "1 King, 1 Rook, 1 Bishop and 2 Knights" because without the bishop, there are 16 distinct ways not 8. I noticed this because your example placement included a bishop.
This comment is hidden because it contains spoiler information about the solution
Also experiencing the same issue with haskell
Thank you for your suggestion
Considering str::replace does one copy and full iteration of the string buffer for EACH call. This may be OK for strings up to a few hundred chars and <10 replace calls, but for anything even approaching real-life scenario a loop is WAY better for performance than multiple str::replace calls.