#33 - Convert 1D Array to 2D Array
Example 1
Input
nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]
m = 3
n = 3Output
[
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]Example 2
Input
Output
Example 3
Input
Output
Last updated