Description
Solutions
Minimum Obstacle Removal
🔥 FULLTIME

You are given a 2d matrix which consist of the following symbols ".", "#", "|", where "." represent free cell, "#" represent a obstacle, "|" denotes shape. Your task is to find out the minimum obstacle to remove from the matrix so that the shapes falls down to the bottom.

Example 1:

Input:  matrix = [["*", "*", "*", "*"], ["#", "*", ".", "*"], [".", ".", "#", "."], [".", "#", ".", "#"]]
Output: 4
Explanation:
Hence, return 4.
Constraints:
    N/A
Thumbnail 0
Testcase

Result
Case 1

input:

output: