Devin's Blog

Home

❯

Coding

❯

Concatenation of Array

Concatenation of Array

Aug 22, 20231 min read

  • idea
class Solution:
    def getConcatenation(self, nums: List[int]) -> List[int]:
        n = len(nums)
        res = []
        for i in range(2 * n):
            res.append(nums[i % n])
        return res

References

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


Graph View

Created with Quartz v4.5.0 © 2026

  • GitHub
  • Discord Community