We’re preparing your current view and syncing the latest data.
You are given an array of positive integers. For each integer, separate its digits and append them to a new array in the same order. Return the new array containing all separated digits in order.
An array of integers nums.
Return an array of integers, where each digit of the original numbers is separated into individual elements in the order they appear.
1 <= nums.length <= 1000 1 <= nums[i] <= 10^5
Example 1
Input
[13, 25, 83, 77]
Output
[1, 3, 2, 5, 8, 3, 7, 7]
Explanation
Digits of 13 are 1 and 3; digits of 25 are 2 and 5, etc.