Back to DSA sheet

Longest Increasing Path in a Matrix

HardDynamic Programming
Open on LeetCodeAmazonGoogleMeta

Find the length of the longest strictly increasing path in a matrix, moving only up, down, left, or right.

Constraints
  • 1 <= m, n <= 200
  • 0 <= matrix[i][j] <= 2^31 - 1
Sheets
Blind 75NeetCode 150NeetCode 250
longest-increasing-path-in-a-matrix.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.