Here is the link.
You are in a matrix where each cell has some coins placed on it. You can move in either of the 4 directions (up, left, right, bottom) where the movement is possible only if the cell you want to move to has strictly greater number of coins than your current cell. You can start from any cell. What is the maximum length of the path you can move?
Let's also try a follow-up: Find a cell from which maximum number of cells are reachable using the rules we've mentioned.
Leetcode 329. Longest Increasing Path in a Matrix, hard level algorithm. My last practice is on May 23, 2019.
No comments:
Post a Comment