Available question text
Given a 1D array, reshape it into an m×n 2D array by grouping consecutive elements into rows (row-major order); return an empty array if original.length != m * n.
Related questions
Continue with questions that share topics or the same question type.
- Convert an Array Into a 2D Array With Conditions
Coding
- Convert Doubly Linked List to Array I
Coding
- Convert Doubly Linked List to Array II
Coding
- Convert Sampled Call Stacks into Start and End Events
Coding · Arrays & Strings · Stacks & Queues
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2022. Convert 1D Array Into 2D Array
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source