LeetCode 1929. Concatenation of Array Posted on 2021-07-11 Edited on 2024-11-24 In LeetCode 123456789101112class Solution {public: vector<int> getConcatenation(vector<int>& nums) { int n = nums.size(); vector<int> ans(n * 2); for (int i = 0; i < n; ++i) { ans[i] = nums[i]; ans[i + n] = nums[i]; } return ans; }};