MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / main

Function main

Recursion/Code/subsets.cpp:43–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41// { Driver Code Starts.
42
43int main(){
44 int n, x;
45 cout<<"Enter number of elements : ";
46 cin >> n;
47
48 vector<int> array;
49 for (int i = 0; i < n; i++)
50 {
51 cin >> x;
52 array.push_back(x);
53 }
54
55
56 Solution ob;
57 vector<vector<int> > res = ob.subsets(array);
58
59 // Print result
60 cout<<endl<<"Subsets are : "<<endl;
61 for (int i = 0; i < res.size(); i++) {
62 for (int j = 0; j < res[i].size(); j++){
63 cout << res[i][j] << " ";
64 }
65 cout << endl;
66 }
67
68 return 0;
69} // } Driver Code Ends

Callers

nothing calls this directly

Calls 1

subsetsMethod · 0.45

Tested by

no test coverage detected