[LeetCode]Permutations
来源:互联网 发布:php知名开源商城 编辑:程序博客网 时间:2024/06/15 17:48
题目描述:给出一列数,要求给出它的全排列。
我比较弱,只用了stl。
class Solution {public: vector<vector<int> > permute(vector<int> &num) { sort(num.begin(),num.end()); vector<vector<int>> result; do { result.push_back(num); }while(next_permutation(num.begin(),num.end())); return result; }};
DFS怎么写,这两天一定要搞出来。
0 0
- 【LeetCode】Permutations && Permutations II
- leetcode: Permutations/Permutations II
- leetcode Permutations & Permutations II
- [Leetcode]Permutations && Permutations II
- LeetCode: Permutations
- LeetCode: Permutations
- [Leetcode] Permutations
- [LeetCode] Permutations
- Leetcode: Permutations
- [Leetcode] Permutations
- [Leetcode] Permutations
- [LeetCode]Permutations
- LeetCode-Permutations
- [leetcode] permutations
- LeetCode - Permutations
- Leetcode: Permutations
- 【leetcode】Permutations
- 【LeetCode】Permutations
- tcp-ip Introduction
- C语言中闭包的探究及比较
- ltib的使用方法(三)
- 计算机的启动
- JPush 推送应用
- [LeetCode]Permutations
- quick-x lua sprite使用
- APUE学习第二天(1)——双系统重装Ubuntu出现:error file not found. grub rescue之grub修复
- oracle分析函数
- iOS--CoreData
- 剑指offer 面试题28 字符串全排列
- VS2005 中error C2440: 如无法从“const char [N]”转换为“LPCWSTR” 的一点总结
- O2O网络联盟 区域性站点的抱团发展
- css 多列布局