Question
A robot starts at the top-left of an R x C grid and wants to reach the bottom-right. Cell value 0 is open and 1 is an obstacle; the robot may remove obstacles but wants to remove as few as possible. Moving to an adjacent cell (up/down/left/right) costs one removal if that cell is an obstacle, nothing if it's open. Entering the start or end cell also counts if it happens to be an obstacle. Return the minimum number of obstacles that must be removed to reach the bottom-right cell.
min_obstacles(grid: list[list[int]]) → int[[[0,1,1],[1,1,0],[1,1,0]]]out2State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.