Challenge overview
Hello and welcome to the challenge!
Write a code which receives a string with characters 0
, 1
and ?
and returns all possibilities of replacing ?
characters with 0
or 1
.
Example
solve('0?1') -> ['011', '001']
Input
- a string with characters
0
,1
and?
Output
- an array concaining all possible ways of complementing the given string
Constraints
0 < length of the given string < 100
0 < amount of ? characters in the given string < 10
You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Have fun and good luck! :)