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

Commit37f520b

Browse files
authored
Create Count Prefixes of a Given String.java
1 parent1465f40 commit37f520b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
classSolution {
2+
publicintcountPrefixes(String[]words,Strings) {
3+
return (int)Arrays.stream(words).filter(word ->s.startsWith(word)).count();
4+
}
5+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp