题解 | #字符串的排列#
字符串的排列
http://www.nowcoder.com/practice/fe6b651b66ae47d7acce78ffdd9a96c7
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自动去重