Problem
Given a list of integers nums, return every different subsequence that is non-decreasing (each value is at least the one before it) and has at least two elements. A subsequence keeps the original order but may skip elements. Return them in any order.
Example 1
- Input
- [4, 6, 7, 7]
- Output
- [[4, 6], [4, 6, 7], [4, 6, 7, 7], [4, 7], [4, 7, 7], [6, 7], [6, 7, 7], [7, 7]]
Example 2
- Input
- [4, 4, 3, 2, 1]
- Output
- [[4, 4]]
Constraints
1 <= nums.length <= 15-100 <= nums[i] <= 100