更新时间:2022-12-11 08:41:27
遇到?"时,将其替换为0"并重复出现,然后将其替换为1"并再次出现.
When you encounter a '?', replace it with a '0' and recur, then replace it with a '1' and recur.
private void permute(String s) {
...
if (s.charAt(i) == '?') {
permute(<replacing '?' with '0'>);
permute(<replacing '?' with '1'>);
}
...
}