https://leetcode.com/problems/shuffle-the-array/



Runtime: 109 ms, faster than 48.57% of TypeScript online submissions for Shuffle the Array.

Memory Usage: 44.9 MB, less than 80.00% of TypeScript online submissions for Shuffle the Array.


```typescript
function shuffle(nums: number[], n: number): number[] {
    //8:26
    let array1 = nums.slice(0,n)
    let array2 = nums.slice(n,n*2)
    let result = []
    while ((array1.length > 0) || (array2.length > 0)) {
        result.push(array1.shift())
        result.push(array2.shift())
    }
    return result
    //8:29
};
```
