This question evaluates array and matrix manipulation skills, specifically in-place row reversal, row swapping, and 90-degree rotation, and falls under the Coding & Algorithms domain with emphasis on practical implementation.

You are given an integer matrix A of size n × m and a list of string commands to apply in order. Implement the commands and return the final matrix.
Each command is one of:
"reverseRow r"
r
is a 0-based row index.
r
in-place.
"swap r1 r2"
r1
and
r2
are 0-based row indices.
"rotate"
m × n
.
A
and
commands
.
0 ≤ r, r1, r2 < current_number_of_rows
at the time the command is executed.
n, m ≥ 1
.
If A = [[1,2,3],[4,5,6]] and commands = ["reverseRow 0", "rotate"], then:
reverseRow 0
:
[[3,2,1],[4,5,6]]
rotate
:
[[4,3],[5,2],[6,1]]
Return
[[4,3],[5,2],[6,1]]
.