In a gold mine grid of size m x n, each cell has an integer representing the amount of gold or 0 if empty. The task is to return the maximum amount of gold you can collect with these conditions: collect gold from the current cell, move one step up, down, left, or right, don't revisit a cell, don't visit cells with 0 gold, start and stop at any position with gold.
Click Run to execute sample tests.