Question
A robot starts at the top-left of an m x n grid and wants to reach the bottom-right, moving only right or down. Some cells contain obstacles marked 1 (free cells are 0); the robot cannot enter an obstacle. Return the number of distinct obstacle-free paths. If the start or destination cell is an obstacle, return 0. Dimensions are at least 1x1 and at most 100x100.
unique_paths_with_obstacles(grid: list[list[int]]) → int[[[0,0,0],[0,1,0],[0,0,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.