Skip to content

Commit d4b9c1b

Browse files
author
nullptr
authored
Added files
1 parent 112bf0f commit d4b9c1b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
object Solution {
2+
def getConcatenation(nums: Array[Int]): Array[Int] = {
3+
val n = nums.length
4+
val ans = new Array[Int](2 * n)
5+
6+
for (i <- 0 until n) {
7+
ans(i) = nums(i)
8+
ans(i + n) = nums(i)
9+
}
10+
11+
ans
12+
}
13+
}

0 commit comments

Comments
 (0)