Pergunta de entrevista da empresa CapTech

Find all permutations of a string with variable characters. I.e. 11?? where ? can be 0 or 1.