Skip to content

Commit 112bf0f

Browse files
author
nullptr
authoredAug 19, 2023
Added files
1 parent 2ce2584 commit 112bf0f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎csharp/1929-concatenation-of-array.cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
public class Solution {
2+
public int[] GetConcatenation(int[] nums) {
3+
int n = nums.Length;
4+
int[] ans = new int[2 * n];
5+
6+
for (int i = 0; i < n; i++) {
7+
ans[i] = nums[i];
8+
ans[i + n] = nums[i];
9+
}
10+
11+
return ans;
12+
}
13+
}

0 commit comments

Comments
 (0)