【leetcode】重新排列数组
2021-03-29 00:27
标签:bsp shu col leetcode scroll import color imp for 【leetcode】重新排列数组 标签:bsp shu col leetcode scroll import color imp for 原文地址:https://www.cnblogs.com/ganxiang/p/13619419.htmlint* shuffle(int* nums, int numsSize, int n, int* returnSize){
int* arr = (int*)calloc(numsSize, sizeof(int));
int pst = 0;
for (int i = 0; i 2; i++)
{
arr[pst++] = nums[i];
arr[pst++] = nums[i+n];
}
*returnSize = numsSize;
return arr;
}