I would never have thought of this solution.
So, just a heads-up for anyone who considers starting this kata:
It was omitted from the description on purpose.
Apparently it is not necessary for users to get a full picture of the kata requirements before they start working.
Added sample tests for JS
A very interesting one to fully apply the DRY (Don't Repeat Yourself) principle :-). Thanks!
I may just be a bit slow, but this felt more like a 4 kyu based on the amount of time it took me ...
very clever this one!
Added link to detailed explanation (wikipedia)
Random tests in Python and Java are aligned, and sufficiently random for such a simple problem IMHO.
Great, thanks. Looks OK to me and I have aproved it. Cheers!
Please review and approve. :)
Random test in PHP don't work. On input ...PO....P... my code in local machine give expected value 0001000001234 but In code wars is 0000000001234. This is not imposible to generate that output.
This comment is hidden because it contains spoiler information about the solution
Thank you for your help.