[LeetCode] Find Minimum Time to Reach Last Room II

1 · · Nov. 3, 2024, 8:38 p.m.
3342. Find Minimum Time to Reach Last Room II There is a dungeon with n x m rooms arranged as a grid. You are given a 2D array moveTime of size n x m, where moveTime[i][j] represents the minimum time in seconds when you can start moving to that room. You start from the room (0, 0) at time t = 0 and can move to an adjacent room. Moving between adjacent rooms takes one second for one move and two seconds for the next, alternating between the two. Return the minimum time to reach the room (n - 1, ...