NeetCode #923LC-1861MediumMath & Geometry
← Back to All Problems

#923 · #1861 · Rotating the Box(旋转盒子)

📌 Problem Statement & Constraints

Given an m x n box represented by a grid of characters, where # is a stone, * is a fixed obstacle and . is empty, rotate the box 90 degrees clockwise so that it becomes n x m, then let gravity pull every stone down until it rests on the floor or on an obstacle. Return the resulting grid. Constraints: 1 <= m, n <= 500, and each cell is one of #, *, ..
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!