Post

leetcode(리트코드)-1929 Concatenation of Array(python)

leetcode 1929 - Concatenation of Array 문제입니다.

1. 문제

https://leetcode.com/problems/concatenation-of-array/


2. Input , Output


3. 분류 및 난이도

Eazy 난이도 문제입니다.


4. 문제 해석

  • nums라는 배열이 들어옵니다. nums를 두 번 반복한 배열을 리턴합니다.

5. code

코드설명

python

1
2
3
4
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        return nums + nums
        

6. 결과 및 후기, 개선점

필요시 c++로 짜드리겠습니다.

This post is licensed under CC BY 4.0 by the author.