← Microsoft questions

Print array elements row-wise or column-wise

Filed under Microsoft

Given a 1D array of elements and dimensions (R, C) where R * C equals the array length, print or return the elements in a 2D matrix format either in row-major or column-major order based on a boolean…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.