---
title: "LeetCode #1929: Concatenation of Array"
url: https://perrotta.dev/2025/11/leetcode-%231929-concatenation-of-array/
last_updated: 2026-01-03
---


[LeetCode #1929: Concatenation of Array](https://leetcode.com/problems/concatenation-of-array):

Various ways to concatenate:

```python
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        return nums * 2
```

```python
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        return [n for n in nums] + [n for n in nums]
```

```python
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        return nums + nums
```

```python
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        for n in nums[:]:
            nums.append(n)
        return nums
```

```python
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        ans = []
        for _ in range(2):
            for n in nums:
                ans.append(n)
        return ans
```

