We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent defc4fc commit f48aee6Copy full SHA for f48aee6
lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11/Lesson11.java
@@ -25,17 +25,14 @@ public int[] getConcatenation(int[] nums) {
25
* https://leetcode.com/problems/find-words-containing-character/
26
*/
27
public List<Integer> findWordsContaining(String[] words, char x) {
28
- List<Integer> result = new ArrayList<>();
+ List<Integer> result = new ArrayList<>();
29
30
- for (int i = 0; i < words.length; i++) {
31
- if (words[i].indexOf(x) != -1) {
32
- result.add(i);
33
- }
34
35
-
36
- return result;
+ for (int i = 0; i < words.length; i++) {
+ if (words[i].indexOf(x) != -1) {
+ result.add(i);
+ }
37
}
38
-}
39
40
41
+ return result;
+}
0 commit comments