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.
Thank you, I finally got it! My mistake was that I iterated i from 1 to s1.length and therefore the 0th character of s3 (that after reversion became the last) was skipped.
I had tried running it in VS, but VS doesn't show this "null-character". I found it via an online compiler.
Wait, it is claimed that
The input should consist only of binary digits - no spaces, other digits, alphanumeric characters, etc.
But in the next string the last example for JS is
multipleof3Regex.test(' abc ') should be false
.But ' abc ' can NOT be input, because it contradicts the condition, can it?
This comment is hidden because it contains spoiler information about the solution
If it matters, I get a inverted string and to reverse it I use
string(s.rbegin(), s.rend()
andreverse(s.begin(), s.end()
. Neither works.This comment is hidden because it contains spoiler information about the solution