mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
23 lines
730 B
HTML
23 lines
730 B
HTML
<p>某店铺将用于组成套餐的商品记作字符串 <code>goods</code>,其中 <code>goods[i]</code> 表示对应商品。请返回该套餐内所含商品的 <strong>全部排列方式</strong> 。</p>
|
|
|
|
<p>返回结果 <strong>无顺序要求</strong>,但不能含有重复的元素。</p>
|
|
|
|
<p> </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> </p>
|
|
|
|
<p><strong>提示:</strong></p>
|
|
|
|
<ul>
|
|
<li><code>1 <= goods.length <= 8</code></li>
|
|
</ul>
|
|
|
|
<p> </p>
|