Grid-Dp
LeetCode 3651: Minimum Cost Path with Teleportations
·2 mins
LeetCode
Hard
Dynamic-Programming
Grid-Dp
Matrix
Array
LeetCode 3651 note: compute layer by layer over teleports; arriving at a cell by teleport costs the previous layer’s minimum over cells with value >= it, found with a running minimum after sorting, followed by the usual right / down grid DP