Added method that generates all possibilities by replacing ? in the string with 0 and 1