Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the array nums.
Use two pointers approach: Given an index i (choose it as the minimum in a subsequence) find the maximum j where j ≥ i and nums[i] +nums[j] ≤ target.
Count the number of subsequences.