| 1 | class Solution { |
| 2 | public: |
| 3 | void comb(int i,int n , int k, vector<vector<int>> &l,vector<int> &c){ |
| 4 | if (c.size()==k){ |
| 5 | l.push_back(c); |
| 6 | return; |
| 7 | } |
| 8 | for (int j=i; j<=n;j++){ |
| 9 | c.push_back(j); |
| 10 | comb(j+1,n,k,l,c); |
| 11 | c.pop_back(); |
| 12 | } |
| 13 | } |
| 14 | vector<vector<int>> combine(int n, int k) { |
| 15 | vector<int> c; |
| 16 | vector<vector<int>> l; |
nothing calls this directly
no outgoing calls
no test coverage detected