python easy two-pointers + sorting solution
\nclass Solution:\n    def numSubseq(self, nums: List[int], target: int) -> int:\n        n = len(nums)\n        \n        nums.sort()\n        i, j = 0, n-1\n 
```\nclass Solution:\n    def numSubseq(self, nums: List[int], target: int) -> int:\n        n = len(nums)\n        \n        nums.sort()\n        i, j = 0, n-1\n        \n        \n        res = 0 \n        NUM = 10**9+7\n        while i <= j:\n            if nums[i] + nums[j] > target:\n                j -= 1\n            elif nums[i] + nums[j] <= target:\n                res += pow(2, j-i, NUM)\n                i += 1\n            #else: # nums[i] + nums[j] == target\n                \n            \n            \n        return res % NUM\n```
['Two Pointers', 'Sorting', 'Python', 'Python3']