Skip to content

Commit c319232

Browse files
authored
Merge pull request #2384 from faisalsaifii/main
1929 Concatenation of Array Java Solution
2 parents 7741235 + 9d45c48 commit c319232

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution {
2+
public int[] getConcatenation(int[] nums) {
3+
int[] ans = new int[nums.length*2];
4+
for(int i=0;i<nums.length;i++) {
5+
ans[i] = nums[i];
6+
ans[i+nums.length] = nums[i];
7+
}
8+
return ans;
9+
}
10+
}

0 commit comments

Comments
 (0)