C++  | Unique solution✅✅
\nclass Solution {\npublic:\n    int numSubseq(vector<int>& nums, int target) {\n        int count =0 ; \n        int n = nums.size();\n        vector<int>pow(n
```\nclass Solution {\npublic:\n    int numSubseq(vector<int>& nums, int target) {\n        int count =0 ; \n        int n = nums.size();\n        vector<int>pow(n,1);\n        sort(nums.begin(), nums.end());\n        for(int i =1;i<n;i++){\n            pow[i] = (pow[i-1] * 2) % (1000000007 );\n        }\n        int left =0 ; int right = n-1;\n        while(left<=right){\n            if(nums[left]  + nums[right] > target) right--;\n            else{\n                count  = (count + pow[right-left] ) % (1000000007 );\n                left++;\n            }\n        }\n        return count;\n    }\n};\n```\n![image](https://assets.leetcode.com/users/images/dcb5c9c1-93cf-42d3-bbe9-6df4d302ffb8_1683347031.4018738.png)\n
['C']