Search⌘ K
AI Features

Solution: Rotating the Box

Solution: Rotating the Box rotates a character grid 90 degrees clockwise, then lets stones fall toward the new bottom while obstacles stay fixed. Return the resulting matrix.

Statement

You are given an m×nm \times n matrix of characters boxGrid representing a side-view of a box. Each cell in the box contains one of ...