Unique paths with obstacles
easyRight and down only, so the ways to reach a cell are the ways to reach the cell above plus the one to its left. An obstacle is just a zero - no branching logic needed.
Worst
O(rows × cols)Space O(rows × cols), or O(cols) with one rowLoading the unique paths with obstacles engine…