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)/套餐内商品的排列顺序 [zi-fu-chuan-de-pai-lie-lcof].html

23 lines
730 B
HTML
Raw Normal View History

2023-12-09 18:53:53 +08:00
<p>某店铺将用于组成套餐的商品记作字符串 <code>goods</code>,其中 <code>goods[i]</code> 表示对应商品。请返回该套餐内所含商品的 <strong>全部排列方式</strong></p>
<p>返回结果 <strong>无顺序要求</strong>,但不能含有重复的元素。</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong>goods = "agew"
<strong>输出:</strong>["aegw","aewg","agew","agwe","aweg","awge","eagw","eawg","egaw","egwa","ewag","ewga","gaew","gawe","geaw","gewa","gwae","gwea","waeg","wage","weag","wega","wgae","wgea"]
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= goods.length &lt;= 8</code></li>
</ul>
<p>&nbsp;</p>