Skip to content

Commit 93f43d5

Browse files
add 1929
1 parent 334127f commit 93f43d5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag 1
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|1929|[Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1929.java) ||Easy||
1112
|1926|[Nearest Exit from Entrance in Maze](https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1926.java) ||Medium|DP, DFS, BFS|
1213
|1925|[Count Square Sum Triples](https://leetcode.com/problems/count-square-sum-triples/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1925.java) ||Easy|Array, Greedy|
1314
|1920|[Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1920.java) ||Easy||
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.fishercoder.solutions;
2+
3+
public class _1929 {
4+
public static class Solution1 {
5+
public int[] getConcatenation(int[] nums) {
6+
int[] result = new int[nums.length * 2];
7+
int i = 0;
8+
for (; i < nums.length; i++) {
9+
result[i] = nums[i];
10+
}
11+
for (int j = 0; i < result.length && j < nums.length; i++, j++) {
12+
result[i] = nums[j];
13+
}
14+
return result;
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)