You are given a grid with m x n dimensions, where each cell contains an arrow pointing to one of four directions:
(0, 0) and aim to reach the bottom-right corner (m-1, n-1) by following the arrows.1.Input: [[1,1,1,1],[2,2,2,2],[1,1,1,1],[2,2,2,2]]

3Explanation: Modify arrows in 3 cells to create a valid path from (0, 0) to (3, 3).
Input: [[1,1,3],[3,2,2],[1,1,4]]
Output: 0
Explanation: A valid path already exists without any modifications.
Input: [[1,2],[4,3]]
Output: 1
Explanation: Modify one cell's arrow to create a valid path.
1 <= m, n <= 1001 to 4.https://leetcode.com/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid/description/
Loading component...
Loading component...