Leetcode 1929. Concatenation of Array
Given an integer array nums, produce ans by concatenating nums with itself so that ans has length 2n and ans[i]=nums[i], ans[i+n]=nums[i] for 0<=i<n; this is a straightforward array concatenation problem solvable in O(n) time and O(n) extra space.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.