C++  Easy Solution with different Approaches
1st Method using extra space.\n\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums)\n    {\n        vector<int>ans;\n        int n =
**1st Method using extra space.**\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums)\n    {\n        vector<int>ans;\n        int n = nums.size();\n        for(int i=0;i<n;i++)\n        {\n            ans.push_back(nums[i]);\n        }\n        for(int i=0;i<n;i++)\n        {\n            ans.push_back(nums[i]);\n        }\n        return ans;\n    }\n};\n```\n**2nd method  without extra Space.**\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        int n=nums.size();\n        for(int i=0;i<n;i++)\n        {\n            nums.push_back(nums[i]);\n        }\n        return nums;\n    }\n};\n```\n**3rd method using copy_n**\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        int len = nums.size();\n        vector<int> res(len * 2);\n        copy_n(nums.begin(), len, res.begin());\n        copy_n(nums.begin(), len, res.begin() + len);\n        return res;\n    }\n};\n```\n**4 method using vectors.**\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& arr1) {\n        vector<int> results;\n        results.reserve(arr1.size() + arr1.size());\n        results.insert(results.end(), arr1.begin(), arr1.end());\n        results.insert(results.end(), arr1.begin(), arr1.end());\n        return results;\n    }\n};\n```\n**5 Method using Maths & vector.**\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        int n=nums.size();\n        vector<int>s(n*2);\n        for(int i=0;i<n;i++){\n            s[i]=nums[i];\n              s[n*2-(n-i)]=nums[i];\n        }\n        return s;\n    }\n};\n```\n**Upvote if this helps you :)**
['Math', 'C', 'C++']