17 lines
402 B
Python
17 lines
402 B
Python
# Link: https://leetcode.com/problems/concatenation-of-array/
|
|
from typing import List
|
|
|
|
|
|
class Solution:
|
|
def getConcatenation(self, nums: List[int]) -> List[int]:
|
|
# ans = [] * (len(nums) * 2)
|
|
ans = nums + nums
|
|
return ans
|
|
|
|
|
|
if __name__ == "__main__":
|
|
nums = [2, 5, 1, 3, 4, 7]
|
|
sol = Solution
|
|
print(nums)
|
|
print(sol().getConcatenation(nums))
|
|
print("-" * 60)
|