Skip to content

Commit 1eab28e

Browse files
committed
Feat: adds in spotless apply
1 parent 6bd7e91 commit 1eab28e

File tree

1 file changed

+15
-14
lines changed
  • lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11

1 file changed

+15
-14
lines changed

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,30 @@ public class Lesson11 {
1111
*/
1212
public int[] getConcatenation(int[] nums) {
1313
int n = nums.length;
14-
int ans[] = new int [2*n];
15-
for (int i = 0; i < nums.length; i++){
14+
int ans[] = new int[2 * n];
15+
for (int i = 0; i < nums.length; i++) {
1616
ans[i] = nums[i];
1717
ans[i + n] = nums[i];
1818
}
1919
return ans;
2020
}
21-
// Had help to understand better solutions from Joseph, Kimberlee, Nile, and Angelica, we were on Jitsi//
22-
21+
22+
// Had help to understand better solutions from Joseph, Kimberlee, Nile, and Angelica, we were on
23+
// Jitsi//
24+
2325
/**
2426
* Provide the solution to LeetCode 2942 here:
2527
* https://leetcode.com/problems/find-words-containing-character/
2628
*/
27-
public class Solution{
28-
public List<Integer> findWordsContaining(String[] words, char x) {
29-
List<Integer> indices = new ArrayList<>();
30-
for(int i = 0; i < words.length; i++){
31-
if (words[i].contains(String.valueOf(x))){
32-
indices.add(i);
33-
}
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);
3435
}
35-
return indices;
36+
}
37+
return indices;
3638
}
37-
}
3839
}
39-
40+
}

0 commit comments

Comments
 (0)