Skip to main content
All Questions

Rotating the Box

Unlock detailed company stats for this questionUpgrade
Given an m x n matrix boxGrid, where each cell is a stone (#), obstacle (*), or empty (.), rotate the box 90° clockwise. Stones fall due to gravity, stopping when they hit an obstacle, another stone, or the bottom. Return the resulting n x m matrix after the rotation.

Community answers

No answers contributed by the community yet.

Related courses

Course

Data Engineering Interview Prep

Land your dream data engineering role at Meta, Google, Amazon, Microsoft, Walmart, DoorDash, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice data modeling, pipeline design, SQL, coding, behavioral interviews, and more.

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.