✅ C# | easy and readable solution 💻 less than 93%
\n\nDon\'t hesitate to suggest or ask bellow about something that you don\'t understand\n\n\npublic class Solution {\n    \n    int sum = 0;\n    public int Bea
![image.png](https://assets.leetcode.com/users/images/02bcfa4c-36f7-4914-aea0-07fbffb97deb_1716497571.021393.png)\n\n**Don\'t hesitate to suggest or ask bellow about something that you don\'t understand**\n\n```\npublic class Solution {\n    \n    int sum = 0;\n    public int BeautifulSubsets(int[] nums, int k) {\n        Helper (nums, k, 0, new List<int>());\n        return sum;\n    }\n\n    void Helper(int[] nums, int k, int start, List<int> subset)\n    {\n        if (subset.Count > 0)\n            sum++;\n        for (int i = start; i < nums.Length; i++)\n        {\n            bool flag = true;\n            foreach (int n in subset)\n                if (Math.Abs(n - nums[i]) == k)\n                {\n                    flag = false;\n                    break;\n                }\n            if (flag)\n            {\n                subset.Add(nums[i]);\n                Helper(nums, k, i + 1, subset);\n                subset.Remove(nums[i]);\n            }\n        }\n    }\n}\n```\n\nIf you like it don\'t forget to **upvote!**
['C#']