https://leetcode.com/problems/combinations/
沿用78题的思路
class Solution {public: void backTrack(vector ans, vector nums, vector>& res, int times,int k) { if(ans.size() == k) { res.push_back(ans); } else { for(int i = times; i
本文共 608 字,大约阅读时间需要 2 分钟。
https://leetcode.com/problems/combinations/
沿用78题的思路
class Solution {public: void backTrack(vector ans, vector nums, vector>& res, int times,int k) { if(ans.size() == k) { res.push_back(ans); } else { for(int i = times; i
通过次数
8,578
提交次数
12,943
转载于:https://www.cnblogs.com/tornado549/p/9995444.html