class Solution { public: vector<string> Permutation(string str) { vector<string> res; do { res.push_back(str); } while (next_permutation(str.begin(), str.end())); return res; } };next_permutation自动去重