Longest Increasing Path in a Matrix — 2-D DP

On an elevation grid, count the cells in the longest path that only ever rises, stepping to orthogonal neighbours.

2-D DP · Hard

More in 2-D DP

All algorithm problems