原题链接:https://leetcode.com/problems/letter-case-permutation/
class Solution {
public:
vector<string> res;
vector<string> letterCasePermutation(string s) {
dfs(s, 0);
return res;
}
void dfs(string s, int i) {
if (i == s.size()) {
res.push_back(s);
return;
}
dfs(s, i + 1);
if (s[i] >= 'A') {
s[i] ^= 32;
dfs(s, i + 1);
}
}
};