Skip to content

Commit 3899944

Browse files
committed
Fix: correcting formatting errors using spotless apply for test to pass
1 parent 120bb4e commit 3899944

File tree

1 file changed

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

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ public class Lesson11 {
1010
* https://leetcode.com/problems/concatenation-of-array
1111
*/
1212
public int[] getConcatenation(int[] nums) {
13-
int n = nums.length;
14-
int [] ans = new int [n * 2];
15-
for (int i=0; i < n; i++){
16-
ans [i] = nums[i];
17-
ans [i + n] = nums[i];
13+
int n = nums.length;
14+
int[] ans = new int[n * 2];
15+
for (int i = 0; i < n; i++) {
16+
ans[i] = nums[i];
17+
ans[i + n] = nums[i];
1818
}
1919
return ans;
2020
}
@@ -24,12 +24,12 @@ public int[] getConcatenation(int[] nums) {
2424
* https://leetcode.com/problems/find-words-containing-character/
2525
*/
2626
public List<Integer> findWordsContaining(String[] words, char x) {
27-
ArrayList <Integer> result = new ArrayList <>();
27+
ArrayList<Integer> result = new ArrayList<>();
2828

29-
for(int i=0; i< words.length: i++) {
30-
if(words [i].indexOf(x) != -1) {
29+
for (int i = 0; i < words.length; i++) {
30+
if (words[i].indexOf(x) != -1) {
3131
result.add(i);
32-
}
32+
}
3333
}
3434
return result;
3535
}

0 commit comments

Comments
 (0)