Available question text
Write an iterative approach for the given binary string with wildcard "?" where the wildcard can be replaced with 0 or 1.
Return all permutations by replacing the wildcard character
e.g.
"0?" -> "00", "01"
"0?1" -> "001", "011"
"0??1" -> "0001", "0011", "0101", "0111"
With the interviewer's hint, solved using the BFS.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Bloomberg
Generate All Binary String Expansions with Wildcard '?'
Reported Jul 24, 2025 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source