class Solution {
public:
vector<string> permutation(string S) {
vector<string> res;
sort(S.begin(), S.end());
do
{
res.push_back(S);
}while(next_permutation(S.begin(), S.end()));
return res;
}
};
leetcode 面试题 08.07. 无重复字符串的排列组合
最新推荐文章于 2022-05-04 22:46:53 发布