class Solution {
public int[] shuffle(int[] nums, int n) {
int[] out = new int[nums.length];
int x =0;
int y = nums.length/2;
for(int i = 0; i < nums.length; i++){
if(i % 2 == 0){
out[i] = nums[x];
x++;
}else{
out[i] = nums[y];
y++;
}
}
return out;
}
}