1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/递增子序列 [non-decreasing-subsequences].html

29 lines
878 B
HTML
Raw Normal View History

2022-12-24 21:54:49 +08:00
<p>给你一个整数数组 <code>nums</code> ,找出并返回所有该数组中不同的递增子序列,递增子序列中 <strong>至少有两个元素</strong> 。你可以按 <strong>任意顺序</strong> 返回答案。</p>
<p>数组中可能含有重复元素,如出现两个整数相等,也可以视作递增序列的一种特殊情况。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>nums = [4,6,7,7]
<strong>输出:</strong>[[4,6],[4,6,7],[4,6,7,7],[4,7],[4,7,7],[6,7],[6,7,7],[7,7]]
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>nums = [4,4,3,2,1]
<strong>输出:</strong>[[4,4]]
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 15</code></li>
<li><code>-100 &lt;= nums[i] &lt;= 100</code></li>
</ul>