After I put all the solutions in a pot, salting them with some own ideas then filtering, I got a really nice solution with 55 bytes. Works for all the examples given by @Eduard.Lebedyuk.
The best idea-donors where, among others, @Stuart Strickland and @Lorenzo Scalese, thank you.
ClassMethod IsValid(s)
{
f{s c=$a(s_0,$i(i))+1 ret:$i(z,c=42-(c=41))>0!'c 'z}
}- Log in to post comments