Easy JS solution Beats 95% online submissions
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @param {number} target\n * @return {number}\n */\nvar numSubseq = function(nums, target) {\n    let pow = [];\n    pow.push(1);\n\n    nums.sort((a,b)=>{return a-b;})\n\n    const mod = 1e9+7;\n\n    for(let i = 1;i < nums.length;i++){\n        pow.push((pow[pow.length-1]*2) % mod);\n    }\n\n    let i = 0, j = nums.length-1, res = 0;\n\n    while(i <= j){\n        if(nums[i]+nums[j] > target){\n            j--;\n        }\n        else{\n            res = (res+pow[j-i++]) % mod;\n        }\n    }\n\n    return res;\n};\n```
['Array', 'Two Pointers', 'Binary Search', 'Sorting', 'JavaScript']