Skip to content

Commit 8f3fe5b

Browse files
committed
Feat:Fixed solutions (removed boilerPlate that caused 'return null' for both solutions)
1 parent 86d1426 commit 8f3fe5b

File tree

1 file changed

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

1 file changed

+2
-18
lines changed

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

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,20 @@ public class Lesson11 {
99
* Provide the solution to LeetCode 1929 here:
1010
* https://leetcode.com/problems/concatenation-of-array
1111
*/
12-
public int[] getConcatenation(int[] nums) {
13-
return null;
14-
}
15-
16-
class Solution {
1712
public int[] getConcatenation(int[] nums) {
1813
int answer[] = new int[2 * nums.length];
1914
for (int i = 0; i < nums.length; i++) {
2015
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++;
16+
answer[i + nums.length] = nums[i];
2617
}
2718
return answer;
2819
}
29-
}
20+
3021

3122
/**
3223
* Provide the solution to LeetCode 2942 here:
3324
* https://leetcode.com/problems/find-words-containing-character/
3425
*/
35-
public List<Integer> findWordsContaining(String[] words, char x) {
36-
37-
return null;
38-
}
39-
}
40-
41-
class Solution {
4226
public List<Integer> findWordsContaining(String[] words, char x) {
4327
List<Integer> resultWords = new ArrayList<>();
4428
for (int i = 0; i < words.length; i++) {

0 commit comments

Comments
 (0)