Problems > Transpose > Editorial

Transpose — Solution & Editorial

Back to the Problem

Element (i, j) moves to (j, i) — swap the loop roles.

Complexity: O(NM)