https://leetcode.com/problems/subsets/description/
class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> res; res.push_back(vector<int>()); for (auto n : nums) { int sz = res.size(); for (int i = 0; i < sz; i++) { vector<int> v = res[i]; v.push_back(n); res.push_back(v); } } return res; } };