Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb88fa85

Browse files
add 1935
1 parente1bdc1d commitb88fa85

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag 1
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|1935|[Maximum Number of Words You Can Type](https://leetcode.com/problems/maximum-number-of-words-you-can-type/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1935.java)||Easy|String|
1112
|1929|[Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1929.java)||Easy||
1213
|1926|[Nearest Exit from Entrance in Maze](https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1926.java)||Medium|DP, DFS, BFS|
1314
|1925|[Count Square Sum Triples](https://leetcode.com/problems/count-square-sum-triples/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1925.java)||Easy|Array, Greedy|
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
packagecom.fishercoder.solutions;
2+
3+
publicclass_1935 {
4+
publicstaticclassSolution1 {
5+
publicintcanBeTypedWords(Stringtext,StringbrokenLetters) {
6+
String[]words =text.split(" ");
7+
intcount =0;
8+
for (Stringword :words) {
9+
booleanbroken =false;
10+
for (charc :word.toCharArray()) {
11+
if (brokenLetters.indexOf(c) != -1) {
12+
broken =true;
13+
break;
14+
}
15+
}
16+
if (!broken) {
17+
count++;
18+
}
19+
}
20+
returncount;
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp