3 ways to solve this problem in C++
Welcome to my fancy solution session.\n\nMethod - 1 :\nWrite fancy code to impress your friends XD. And yes it is fancy and fast.\n\nclass Solution {\npublic:\n
Welcome to my fancy solution session.\n\n**Method - 1 :**\nWrite fancy code to impress your friends XD. And yes it is fancy and fast.\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        nums.insert(nums.end(), nums.begin(), nums.end());\n        return nums;\n    }\n};\n```\nAverage Runtime: 6ms\n\n**Method - 2 :**\nWhen you just want to get the work done.\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        vector<int> ans;\n        for(int i : nums)\n            ans.push_back(i);\n        for(int i : nums)\n            ans.push_back(i);\n        return ans;\n    }\n};\n```\nAverage Runtime: 8ms\n\n**Method - 3 :**\nWhen you write code to impress the interviewer :)\n```\nclass Solution {\npublic:\n    vector<int> getConcatenation(vector<int>& nums) {\n        int n = nums.size();\n        vector<int> ans(2 * n);\n        for(int i = 0; i < n; i++)\n            ans[i] = ans[n+i] = nums[i];\n        return ans;\n    }\n};\n```\nAverage Runtime: 26ms\n\nI hope you liked the sarcastic solutions. Upvote if you laughed :)\n
['Array', 'C']