ADITYA VERMA'S APPROACH || SIMPLE SOLUTION USING SET
```\nclass Solution {\npublic:\n    vector>ans;\n    set>s;\n    \n    void solve(vectorinput, vectoroutput){\n        \n        if(input.size() == 0){\n       
```\nclass Solution {\npublic:\n    vector<vector<int>>ans;\n    set<vector<int>>s;\n    \n    void solve(vector<int>input, vector<int>output){\n        \n        if(input.size() == 0){\n            \n            if(s.find(output) == s.end()){\n                s.insert(output);\n                ans.push_back(output);   \n            }\n            \n            return;\n        }\n        \n        vector<int>op1 = output, op2 = output;\n        \n        op1.push_back(input[0]);\n        input.erase(input.begin() + 0);\n        \n        solve(input, op1);\n        solve(input, op2);   \n    }\n    \n    vector<vector<int>> subsetsWithDup(vector<int>& nums) {\n        \n        sort(nums.begin(), nums.end());\n        vector<int>op;\n        \n        solve(nums, op);\n        return ans; \n    }\n};
['Recursion', 'C', 'Ordered Set', 'C++']