Pure BackTracking || Beats 30.7% || Simple Explanation
\nclass Solution\n{\n    void solve(vector<int> &nums, unordered_map<int, int> &map, int ind, int k, int &cnt)\n    {\n        if (ind >= nums.size())\n        
```\nclass Solution\n{\n    void solve(vector<int> &nums, unordered_map<int, int> &map, int ind, int k, int &cnt)\n    {\n        if (ind >= nums.size())\n        {\n            cnt++;\n            return;\n        }\n        if (!map[nums[ind] - k])\n        {\n            map[nums[ind]]++;\n            solve(nums, map, ind + 1, k, cnt);   //Pick\n            map[nums[ind]]--;\n        }\n        solve(nums, map, ind + 1, k, cnt);   //Not Pick\n    }\n\npublic:\n    int beautifulSubsets(vector<int> &nums, int k)\n    {\n        int ind = 0, cnt = 0;\n        unordered_map<int, int> map;\n\t\t\n        sort(nums.begin(), nums.end());  // Sorting to check previous existence only \n\t\t\n        solve(nums, map, ind, k, cnt);\n\t\t\n        return cnt - 1;  // Subtracting one from cnt for null subset\n    }\n};\n```\n***UPVOTE IF FOUND HELPFUL :)***\n**Any doubts type in comments**
['Backtracking', 'Recursion', 'C']