1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/查找共用字符 [find-common-characters].html
2022-03-29 12:43:11 +08:00

27 lines
810 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

给你一个字符串数组 <code>words</code> ,请你找出所有在 <code>words</code> 的每个字符串中都出现的共用字符( <strong>包括重复字符</strong>),并以数组形式返回。你可以按 <strong>任意顺序</strong> 返回答案。
<p>&nbsp;</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>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= words.length &lt;= 100</code></li>
<li><code>1 &lt;= words[i].length &lt;= 100</code></li>
<li><code>words[i]</code> 由小写英文字母组成</li>
</ul>