Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1002 - Find Common Characters #37

Open
vJechsmayr opened this issue Sep 23, 2020 · 2 comments
Open

1002 - Find Common Characters #37

vJechsmayr opened this issue Sep 23, 2020 · 2 comments

Comments

@vJechsmayr
Copy link
Owner

@vJechsmayr vJechsmayr commented Sep 23, 2020

Description of the Problem

Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates). For example, if a character occurs 3 times in all strings but not 4 times, you need to include that character three times in the final answer.

You may return the answer in any order.

Example 1:

Input: ["bella","label","roller"]
Output: ["e","l","l"]

Example 2:

Input: ["cool","lock","cook"]
Output: ["c","o"]

Note:

  1. 1 <= A.length <= 100
  2. 1 <= A[i].length <= 100
  3. A[i][j] is a lowercase letter

Code

class Solution:
    def commonChars(self, A: List[str]) -> List[str]:

Link To The LeetCode Problem

LeetCode

@SamC302
Copy link

@SamC302 SamC302 commented Sep 24, 2020

Can I work on this?

@vJechsmayr
Copy link
Owner Author

@vJechsmayr vJechsmayr commented Sep 25, 2020

@SamC302 sure, go ahead 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.