From 24c515282ada19201d460a7e27ddc4979c3eb7ee Mon Sep 17 00:00:00 2001 From: yqq Date: Mon, 27 Sep 2021 16:08:33 +0800 Subject: [PATCH] =?UTF-8?q?1002.=20=E6=9F=A5=E6=89=BE=E5=B8=B8=E7=94=A8?= =?UTF-8?q?=E5=AD=97=E7=AC=A6,=20=20=20=E6=9B=B4=E6=96=B0=E9=A2=98?= =?UTF-8?q?=E7=9B=AE=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/1002.查找常用字符.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/problems/1002.查找常用字符.md b/problems/1002.查找常用字符.md index e02780da..043d20a4 100644 --- a/problems/1002.查找常用字符.md +++ b/problems/1002.查找常用字符.md @@ -12,18 +12,24 @@ [力扣题目链接](https://leetcode-cn.com/problems/find-common-characters/) -给定仅有小写字母组成的字符串数组 A,返回列表中的每个字符串中都显示的全部字符(包括重复字符)组成的列表。例如,如果一个字符在每个字符串中出现 3 次,但不是 4 次,则需要在最终答案中包含该字符 3 次。 +给你一个字符串数组 words ,请你找出所有在 words 的每个字符串中都出现的共用字符( 包括重复字符),并以数组形式返回。你可以按 任意顺序 返回答案。 -你可以按任意顺序返回答案。 +示例 1: -【示例一】 -输入:["bella","label","roller"] +输入:words = ["bella","label","roller"] 输出:["e","l","l"] +示例 2: -【示例二】 -输入:["cool","lock","cook"] +输入:words = ["cool","lock","cook"] 输出:["c","o"] +提示: + +1 <= words.length <= 100 +1 <= words[i].length <= 100 +words[i] 由小写英文字母组成 + + # 思路