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