1929. Concatenation of Array
https://leetcode.com/problems/concatenation-of-array
Description
Given an integer array nums
of length n
, you want to create an array ans
of length 2n
where ans[i] == nums[i]
and ans[i + n] == nums[i]
for 0 <= i < n
(0-indexed).
Specifically, ans
is the concatenation of two nums
arrays.
Return the array ans
.
Example 1:
Example 2:
Constraints:
n == nums.length
1 <= n <= 1000
1 <= nums[i] <= 1000
ac
Previous1928. Minimum Cost to Reach Destination in TimeNext1930. Unique Length-3 Palindromic Subsequences
Last updated