/**
* @author xnl
* @Description:
* @date: 2022/7/31 22:10
*/
public class Solution {
public static void main(String[] args) {
Solution solution = new Solution();
}
public int[] getConcatenation(int[] nums) {
int n = nums.length;
int[] ans = new int[n * 2];
for (int i = 0; i < n; i++){
ans[i] = nums[i];
ans[i + n] = nums[i];
}
return ans;
}
}
力扣:数组串联
于 2022-07-31 22:15:37 首次发布