Box Rotation Simulation

A box is an m x n matrix of numeric cells. A cell is 35 for a stone, 42 for a stationary obstacle, and 0 for an empty cell.

The box is rotated 90 degrees clockwise, so a source cell at row r, column c moves to row c, column m - 1 - r. After the rotation, gravity pulls every stone down as far as it can fall inside its column until it lands on an obstacle, another stone, or the bottom of the box. Obstacles do not move, and the rotation does not change a stone's horizontal position in the rotated frame. Return the final n x m matrix.

Examples
Input: [[35,0,42,0],[35,35,42,0]]
Output: [[35,0],[35,35],[42,42],[0,0]]
Hints

Box Rotation Simulation

A box is an `m x n` matrix of numeric cells. A cell is `35` for a stone, `42` for a stationary obstacle, and `0` for an empty cell.