Shuffle the Array
Easy
Arrays
Array
Given [x1,x2,...,xn,y1,y2,...,yn], return [x1,y1,x2,y2,...,xn,yn].
Constraints
1 ≤ n ≤ 500
Examples
Example 1:
Input: 2 5 1 3 4 7
3
Output: 2 3 5 4 1 7
Example 2:
Input: 1 2 3 4 4 3 2 1
4
Output: 1 4 2 3 3 2 4 1
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console