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 剑指 Offer 38. 字符串的排列
猜你喜欢
转载自blog.csdn.net/weixin_43956456/article/details/107721062
今日推荐
周排行