Not only was this a fun kata, but the explanation was really well-written, in my view. In-depth, a friendly tone, and east to grok. Thanks for that!
Wow, this kata is a lot of fun!
Unfortunalely I didn't notice that Go isn't available and solved it in Go haha.
It's cool to see people still are playing with this;
I haven't looked at CodeWars in a while, sorry about that, but looks like you got it aproved
OP has left. Any power user want to approve this?
Made some rewrites to the JS translation (ie. added fixed tests, cleaned up random tests, etc.), so it's now in parity with the Elixir translation. Also, the expected and actual results (for the random tests) will only print to console in the case of a test failure.
Elixir translation awaiting approval.
This comment is hidden because it contains spoiler information about the solution
You should add other sample tests (each time with the number of iteration equal to 2 or 3):
And it's rather useless to print expected/actual to the console if the test is ok (and even when it fails: for more than 3 iterations, the display isn't readable anyway).
(posting as an issue, since the author is inactive => needs access available to PUs)
I see, your solution is bypassing the point, so I added a 30x30 character restriction
Would you like to set some additional restrictions? Or it's going to be 7 kyu, "6.5" kyu maximum.