mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
27 lines
810 B
HTML
27 lines
810 B
HTML
给你一个字符串数组 <code>words</code> ,请你找出所有在 <code>words</code> 的每个字符串中都出现的共用字符( <strong>包括重复字符</strong>),并以数组形式返回。你可以按 <strong>任意顺序</strong> 返回答案。
|
||
<p> </p>
|
||
|
||
<p><strong>示例 1:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>words = ["bella","label","roller"]
|
||
<strong>输出:</strong>["e","l","l"]
|
||
</pre>
|
||
|
||
<p><strong>示例 2:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>words = ["cool","lock","cook"]
|
||
<strong>输出:</strong>["c","o"]
|
||
</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>提示:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>1 <= words.length <= 100</code></li>
|
||
<li><code>1 <= words[i].length <= 100</code></li>
|
||
<li><code>words[i]</code> 由小写英文字母组成</li>
|
||
</ul>
|