How to check if the string is reshaped? Example: "aab" returns 0 because "a" can't be reshaped to this string nor any other shorter string.
Another example is "aabbaab" returns 1 because "aabb" can be reshaped to this string.
A lot of examples can found this:
Returns 1
101
abba
abcab
abacedabarab
abcdefedabc
!@#~€!
Returns 0
aA
~
[][][][]][-
abcac
aecec
Is there a lambda function that does this task?
NOTE: if you are not familiar with APL then read this