mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
35 lines
1023 B
HTML
35 lines
1023 B
HTML
<p>给你一个字符串数组,请你将 <strong>字母异位词</strong> 组合在一起。可以按任意顺序返回结果列表。</p>
|
|
|
|
<p><strong>字母异位词</strong> 是由重新排列源单词的字母得到的一个新单词,所有源单词中的字母通常恰好只用一次。</p>
|
|
|
|
<p> </p>
|
|
|
|
<p><strong>示例 1:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> strs = <code>["eat", "tea", "tan", "ate", "nat", "bat"]</code>
|
|
<strong>输出: </strong>[["bat"],["nat","tan"],["ate","eat","tea"]]</pre>
|
|
|
|
<p><strong>示例 2:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> strs = <code>[""]</code>
|
|
<strong>输出: </strong>[[""]]
|
|
</pre>
|
|
|
|
<p><strong>示例 3:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> strs = <code>["a"]</code>
|
|
<strong>输出: </strong>[["a"]]</pre>
|
|
|
|
<p> </p>
|
|
|
|
<p><strong>提示:</strong></p>
|
|
|
|
<ul>
|
|
<li><code>1 <= strs.length <= 10<sup>4</sup></code></li>
|
|
<li><code>0 <= strs[i].length <= 100</code></li>
|
|
<li><code>strs[i]</code> 仅包含小写字母</li>
|
|
</ul>
|