The TransCompilator

Solved LeetCode program · 638 of 1,000

#0867 · Transpose Matrix

Easy Array chunk-13.md

Original English source

The grid is a list of 1, 2, 3, 4, 5, 6, 7, 8, and 9. The rows is 3. The columns is 3. The lastrow is rows minus 1. The lastcolumn is columns minus 1.
For every column from 0 to lastcolumn.
For every line from 0 to lastrow.
Show item (line times columns plus column) of grid.

Open in Playground Browse all 1,000 problems

Expected stdout

1
4
7
2
5
8
3
6
9