Skip to main content
LeetCode 491, Medium. Topics: Array, Hash Table, Backtracking, Bit Manipulation. View on LeetCode. Generate this problem as a practice environment: tested reference solution, 15 parametrized pytest cases, and a playground notebook:

Problem

Given an integer array nums, return all the different possible non-decreasing subsequences of the given array with at least two elements. You may return the answer in any order.

Examples

Constraints

  • 1 <= nums.length <= 15
  • -100 <= nums[i] <= 100

Solution

Reference implementation from solution.py on GitHub, full suite in test_solution.py:

Complexity

Tags

Last modified on September 7, 2026