摘要:
//和77类似的问题,可以放在一起记忆class Solution { public: vector> subsets(vector& nums) { vector> res; vector add; res.push_back(add); for(int i=1;i >& res,vector &add,vector& n... 阅读全文
摘要:
//这似乎是排列组合的标准写法了已经class Solution { public: vector> combine(int n, int k) { vector> res; vector add; DFS(res,k,n,add,0); return res; } void DFS(vector>... 阅读全文