I want to make a program where it takes a string input where either the character is an A or B or ?. For example, AB?. Then I want my program to replace the question marks with either A or B and output all the possibilities. So for the string AB it will output AA and AB.
This is for a practice problem in a competitive programming site and I've been stuck on it for a while
I don't know the link my friend screenshotted the problem and this is a step to getting the answer. I just need to know how to create all the possible strings the input string can be provided all the question marks have been changed
Bob wants to know all the possible ways he can color a line of tiles. Some of these tiles have certain colors but some can be colored as he wishes. Print all the possible ways he can color the tiles
Input
A string with each character being 'A' for color A, 'B' for color B and '?' for uncolored.