|
3 | 3 | importjava.util.ArrayList;
|
4 | 4 | importjava.util.List;
|
5 | 5 |
|
6 |
| -/** |
7 |
| - * 1002. Find Common Characters |
8 |
| - * |
9 |
| - * Given an array A of strings made only from lowercase letters, |
10 |
| - * return a list of all characters that show up in all strings within the list (including duplicates). |
11 |
| - * 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. |
12 |
| - * |
13 |
| - * You may return the answer in any order. |
14 |
| - * |
15 |
| - * Example 1: |
16 |
| - * Input: ["bella","label","roller"] |
17 |
| - * Output: ["e","l","l"] |
18 |
| - * |
19 |
| - * Example 2: |
20 |
| - * Input: ["cool","lock","cook"] |
21 |
| - * Output: ["c","o"] |
22 |
| - * |
23 |
| - * Note: |
24 |
| - * 1 <= A.length <= 100 |
25 |
| - * 1 <= A[i].length <= 100 |
26 |
| - * A[i][j] is a lowercase letter |
27 |
| - */ |
28 | 6 | publicclass_1002 {
|
29 | 7 | publicstaticclassSolution1 {
|
30 | 8 | publicList<String>commonChars(String[]A) {
|
|