Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create string_condition_recursion.cpp
Suppose you have a string, S, made up of only 'a's and 'b's. Write a recursive function that checks if the string was generated using the following rules: a. The string begins with an 'a' b. Each 'a' is followed by nothing or an 'a' or "bb" c. Each "bb" is followed by nothing or an 'a' If all the rules are followed by the given string, return true otherwise return false.
- Loading branch information