Minimum Obstacle Removal
Problem Overview
- Given a 2D matrix with '.', '#', and '|', determine the minimum number of obstacles ('#') to remove so all '|' shapes fall to the bottom under gravity.
- Input: matrix of symbols; Output: an integer for the minimum obstacles removed; constraints not specified.
- Represents a grid-based gravity scenario, like falling pieces in games or physical systems.
- Asked in Uber interviews; a coding interview problem often seen as an interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
