- 0of 0 votes
You have to find out the number of good strings of length N characters in size which you can make using characters A B and C.- Garuda April 12, 2020 in United States
A string is a good String if it satisfies the following three criteria:
The total number of C in the string should not be greater than equal to 4.
There should not be more than two consecutive A's in the string.
Any two B's should be at least two characters apart.
How do I find total possible good strings for N length string?
Time constraint of 1 sec for large N
| Report Duplicate | Flag | PURGE
Open Chat in New Window