DOUBT - Regarding Answer


i wanted to know that while making all possible strings, when we have say N=3, so does the complete string need to follow the rule or only the starting? Like for a string of length 3, ‘ae’ after this can any letter be written after e? or do the complete rules need to be followed for the complete string so that means only say ‘aei’ will be possible and rest all will be discarded?


Entire generated string need to follow the rules…