Skip to content

Commit 4ad3a7f

Browse files
author
“A1-4U2T1NN”
committed
fix: corrected spotless format error in lesson 11;
1 parent 4d21667 commit 4ad3a7f

File tree

1 file changed

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

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package com.codedifferently.lesson11;
22

3-
import java.util.List;
4-
53
import java.util.ArrayList;
4+
import java.util.List;
65

76
public class Lesson11 {
87

@@ -12,7 +11,8 @@ public class Lesson11 {
1211
*/
1312
public int[] getConcatenation(int[] nums) {
1413
int[] ans = new int[nums.length + nums.length];
15-
for(int i = 0; i < nums.length; i++) {
14+
15+
for (int i = 0; i < nums.length; i++) {
1616
ans[i] = nums[i];
1717
ans[i + nums.length] = nums[i];
1818
}
@@ -25,14 +25,15 @@ public int[] getConcatenation(int[] nums) {
2525
*/
2626
public List<Integer> findWordsContaining(String[] words, char x) {
2727

28-
List<Integer> arrayOfIndices = new ArrayList<>(); // Use a List to dynamically store indices
28+
List<Integer> arrayOfIndices = new ArrayList<>(); // Use a List to dynamically store indices
2929

3030
for (int i = 0; i < words.length; i++) {
3131
String letter = String.valueOf(x);
32-
if (words[i].contains(letter)){ // Check if the character is present in the word
32+
33+
if (words[i].contains(letter)) { // Check if the character is present in the word
3334
arrayOfIndices.add(i); // Add the index to the list
3435
}
3536
}
3637
return arrayOfIndices; // Return list
3738
}
38-
}
39+
}

0 commit comments

Comments
 (0)