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

Function main

Recursion/Homework/Subsets.cpp:48–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46// { Driver Code Starts.
47
48int main()
49{
50 int t;
51 cin >> t;
52
53 while (t--)
54 {
55 int n, x;
56 cin >> n;
57
58 vector<int> array;
59 for (int i = 0; i < n; i++)
60 {
61 cin >> x;
62 array.push_back(x);
63 }
64
65
66 Solution ob;
67 vector<vector<int> > res = ob.subsets(array);
68
69 // Print result
70 for (int i = 0; i < res.size(); i++) {
71 for (int j = 0; j < res[i].size(); j++)
72 cout << res[i][j] << " ";
73 cout << endl;
74 }
75
76
77 }
78
79 return 0;
80} // } Driver Code Ends

Callers

nothing calls this directly

Calls 1

subsetsMethod · 0.45

Tested by

no test coverage detected