C++ very simple solution
Here we need to find out subsequence so that now we can sort the array. \nAlgo - \n1. We first sort the array.\n2. Use 2 pointers approach let say i and j.\n\t\
Here we need to find out subsequence so that now we can sort the array. \nAlgo - \n1. We first sort the array.\n2. Use 2 pointers approach let say i and j.\n\t\ti=0 and j=n-1;\n\tnow if(nums[i]+nums[j]<=target) then we can make substrings out of that \n\t\t\tnext thing from this how many substrings we can make we need to maintain nums[i[ as minimum we need to take it and  the maximum element can be any from i+1 to j\n\tSo, for every element we have two choices whether to take or not so, we have 2^(j-i) substrings out of that. and i++;\n\telse j--\n\n\n```\nclass Solution {\npublic:\n    int mod=1000000007;\n    int numSubseq(vector<int>& nums, int target) \n    {\n        sort(nums.begin(),nums.end());\n        int res=0,n=nums.size(),i=0,j=n-1;\n        vector<int>pow2(n+1,1);\n        for(int i=1;i<=n;i++)\n        {\n            pow2[i]=(2*pow2[i-1])%mod;\n        }\n        while(i<=j)\n        {\n            if(nums[j]+nums[i]<=target)\n            {\n                res=(res+pow2[j-i])%mod;\n                i++;\n            }\n            else\n                j--;\n        }\n        return res;\n    }\n};\n```\n\nIt would be great if you upvote.\n\t
['C', 'C++']