rows, and the rows may have different lengths. The element rows[i][j] sits on diagonal number i + j.
List all elements, going through the diagonals in increasing order. Within one diagonal go from bottom to top: the element with the larger row index i comes first. If a row is too short to have a cell on that diagonal, just skip it.
Return the resulting list.rows=[[4, 7, 1], [9], [2, 6]] → [4, 9, 7, 2, 1, 6]
Diagonal 0: 4. Diagonal 1, bottom to top: 9, 7. Diagonal 2: 2 (row 2), row 1 has no such cell, then 1. Diagonal 3: just 6.
rows=[[3], [5, 8, 11]] → [3, 5, 8, 11]
3, then 5, then 8 and 11, each alone on its diagonal.
rows=[[12, 13, 14]] → [12, 13, 14]
rows=[[4, 7, 1], [9], [2, 6]]
[4, 9, 7, 2, 1, 6]
Run checks the first 3 tests in your browser. Submit checks all 73 tests on the server, hidden ones included.