You are given an integer array nums of length x1, x2, ..., xn and the last y1, y2, ..., yn. Return a new array formed by interleaving these two halves in the order x1, y1, x2, y2, ..., xn, yn.
Implement List[int] shuffle(self, List[int] nums, int n) to produce the shuffled array.
Constraints:
n
nums.length
nums[i]
You are given an integer array nums of length x1, x2, ..., xn and the last y1, y2, ..., yn. Return a new array formed by interleaving these two halves in the order x1, y1, x2, y2, ..., xn, yn.
Implement List[int] shuffle(self, List[int] nums, int n) to produce the shuffled array.
Constraints:
n
nums.length
nums[i]