Skip to content

Commit 86d1426

Browse files
committed
Feat: Gradle SpotlessApply fix
1 parent df71ce2 commit 86d1426

File tree

2 files changed

+29
-20
lines changed
  • lesson_11/arrays_java/arrays_app/src

2 files changed

+29
-20
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* This source file was generated by the Gradle 'init' task
3+
*/
4+
package org.example
5+
6+
class Library {
7+
fun someLibraryMethod(): Boolean {
8+
return true
9+
}
10+
}

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

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,23 @@ public class Lesson11 {
1111
*/
1212
public int[] getConcatenation(int[] nums) {
1313
return null;
14-
}
14+
}
15+
1516
class Solution {
1617
public int[] getConcatenation(int[] nums) {
17-
int answer[] = new int[2 * nums.length];
18-
for(int i = 0; i < nums.length; i ++) {
19-
answer[i]= nums[i];
20-
}
21-
int index = nums.length;
22-
for(int i = 0; i < nums.length; i ++) {
23-
answer[index] = nums[i];
24-
index++;
18+
int answer[] = new int[2 * nums.length];
19+
for (int i = 0; i < nums.length; i++) {
20+
answer[i] = nums[i];
21+
}
22+
int index = nums.length;
23+
for (int i = 0; i < nums.length; i++) {
24+
answer[index] = nums[i];
25+
index++;
2526
}
2627
return answer;
2728
}
2829
}
2930

30-
31-
3231
/**
3332
* Provide the solution to LeetCode 2942 here:
3433
* https://leetcode.com/problems/find-words-containing-character/
@@ -37,16 +36,16 @@ public List<Integer> findWordsContaining(String[] words, char x) {
3736

3837
return null;
3938
}
40-
}
39+
}
4140

42-
class Solution {
43-
public List<Integer> findWordsContaining(String[] words, char x) {
44-
List<Integer> resultWords = new ArrayList<>();
45-
for (int i = 0; i < words.length; i++) {
46-
if (words[i].indexOf(x) != -1) {
41+
class Solution {
42+
public List<Integer> findWordsContaining(String[] words, char x) {
43+
List<Integer> resultWords = new ArrayList<>();
44+
for (int i = 0; i < words.length; i++) {
45+
if (words[i].indexOf(x) != -1) {
4746
resultWords.add(i);
4847
}
4948
}
50-
return resultWords;
51-
}
52-
}
49+
return resultWords;
50+
}
51+
}

0 commit comments

Comments
 (0)