Search
⌘K

Leetcode 3651. Minimum Cost Path with Teleportations

Find the minimum cost to go from the top-left to bottom-right of an m×n grid where right/down moves cost the destination cell value and you may up to k times teleport for free to any cell with value ≤ your current cell. The key challenge is handling many zero-cost teleport edges by encoding remaining teleports in the state (k up to 10, m,n ≤ 80) and computing shortest paths/DP over that expanded state space.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.