File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
lesson_11/arrays_java/arrays_app/src/main/java/com/codedifferently/lesson11 Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,14 @@ public class Lesson11 {
9
9
* Provide the solution to LeetCode 1929 here:
10
10
* https://leetcode.com/problems/concatenation-of-array
11
11
*/
12
- public int [] getConcatenation (int [] nums ) {
13
- int answer [] = new int [2 * nums .length ];
14
- for (int i = 0 ; i < nums .length ; i ++) {
15
- answer [i ] = nums [i ];
16
- answer [i + nums .length ] = nums [i ];
17
- }
18
- return answer ;
12
+ public int [] getConcatenation (int [] nums ) {
13
+ int answer [] = new int [2 * nums .length ];
14
+ for (int i = 0 ; i < nums .length ; i ++) {
15
+ answer [i ] = nums [i ];
16
+ answer [i + nums .length ] = nums [i ];
19
17
}
20
-
18
+ return answer ;
19
+ }
21
20
22
21
/**
23
22
* Provide the solution to LeetCode 2942 here:
You can’t perform that action at this time.
0 commit comments