reshape-uses-flatten-then-slice

Status: IN

`matrixReshape` uses the flatten→slice idiom: nested list comprehension to 1D, then `flat[i*c:(i+1)*c]` to partition into rows — same concept as `numpy.reshape` but with O(m·n) extra space for the intermediate list.

Source: entries/2026/06/06/reshape-the-matrix-solution.md

JSON