Skip to content

Commit 4b2f693

Browse files
refactor 1160
1 parent 35c6379 commit 4b2f693

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/main/java/com/fishercoder/solutions/_1160.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,6 @@
33
import java.util.HashMap;
44
import java.util.Map;
55

6-
/**
7-
* 1160. Find Words That Can Be Formed by Characters
8-
*
9-
* You are given an array of strings words and a string chars.
10-
* A string is good if it can be formed by characters from chars (each character can only be used once).
11-
* Return the sum of lengths of all good strings in words.
12-
*
13-
* Example 1:
14-
*
15-
* Input: words = ["cat","bt","hat","tree"], chars = "atach"
16-
* Output: 6
17-
* Explanation:
18-
* The strings that can be formed are "cat" and "hat" so the answer is 3 + 3 = 6.
19-
*
20-
* Example 2:
21-
*
22-
* Input: words = ["hello","world","leetcode"], chars = "welldonehoneyr"
23-
* Output: 10
24-
* Explanation:
25-
* The strings that can be formed are "hello" and "world" so the answer is 5 + 5 = 10.
26-
*
27-
* Note:
28-
*
29-
* 1 <= words.length <= 1000
30-
* 1 <= words[i].length, chars.length <= 100
31-
* All strings contain lowercase English letters only.
32-
* */
336
public class _1160 {
347
public static class Solution1 {
358
public int countCharacters(String[] words, String chars) {

0 commit comments

Comments
 (0)