Create Target Array
Easy
Arrays
Array
Given nums[] and index[], insert nums[i] at index[i]. Print result.
Constraints
1 ≤ len ≤ 100
Examples
Example 1:
Input: 0 1 2 3 4
0 1 2 2 1
Output: 0 4 1 3 2
Example 2:
Input: 1 2 3 4 0
0 1 2 3 0
Output: 0 1 2 3 4
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console