File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11 Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,14 @@ public int[] getConcatenation(int[] nums) {
22
22
* Provide the solution to LeetCode 2942 here:
23
23
* https://leetcode.com/problems/find-words-containing-character/
24
24
*/
25
-
26
- public List <Integer > findWordsContaining (String [] words , char x ) {
27
- List <Integer > indices = new ArrayList <>();
28
- for (int i = 0 ; i < words .length ; i ++) {
29
- String str = String .valueOf (x );
30
- if (words [i ].contains (str )) {
31
- indices .add (i );
32
- }
25
+ public List <Integer > findWordsContaining (String [] words , char x ) {
26
+ List <Integer > indices = new ArrayList <>();
27
+ for (int i = 0 ; i < words .length ; i ++) {
28
+ String str = String .valueOf (x );
29
+ if (words [i ].contains (str )) {
30
+ indices .add (i );
33
31
}
34
- return indices ;
35
32
}
33
+ return indices ;
36
34
}
37
-
35
+ }
You can’t perform that action at this time.
0 commit comments