Note: It is not a question of any ongoing contest, It is just past interview experience question. So please help me out solving this question
Given a string of a,b, and/or? You can replace it? with a or b. task is to replace all? such that no three consecutive a or b occurs in the string. it is given that such string will always exist we needed to return the modified string.
example
2.a) input->b?aa?
output->bbaab