Search⌘ K
AI Features

Convert 1D Array Into 2D Array

Convert 1D Array Into 2D Array reshapes an integer array into a grid with specified rows and columns, preserving element order. Return an empty array if the dimensions do not match.

Statement

Given a 0-indexed 1-dimensional (1D) integer array original and two integers, m ...