Skip to content

Commit 55e57eb

Browse files
committed
Feat: updates code, removed a class
1 parent 1eab28e commit 55e57eb

File tree

1 file changed

+6
-8
lines changed
  • lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11

1 file changed

+6
-8
lines changed

lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ public int[] getConcatenation(int[] nums) {
2626
* Provide the solution to LeetCode 2942 here:
2727
* https://leetcode.com/problems/find-words-containing-character/
2828
*/
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);
3634
}
37-
return indices;
3835
}
36+
return indices;
3937
}
4038
}

0 commit comments

Comments
 (0)