Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 25c398f

Browse files
authored
Create Find Words Containing Character.java
1 parent 8914d77 commit 25c398f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution {
2+
public List<Integer> findWordsContaining(String[] words, char x) {
3+
return IntStream.range(0, words.length)
4+
.filter(i -> words[i].indexOf(x) != -1)
5+
.boxed()
6+
.collect(Collectors.toList());
7+
}
8+
}

0 commit comments

Comments
 (0)