Search
⌘K

Leetcode 1219. Path with Maximum Gold

Find the maximum sum of gold collectible by walking a path on an m x n grid that starts at any nonzero cell, moves up/down/left/right, cannot enter zero cells or revisit cells, and collects the gold from each visited cell. This is solved by exploring all simple paths via DFS/backtracking (feasible given m,n ≤ 15 and ≤ 25 gold-containing cells).


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.