Given a 2D matrix of integers, find the length of the longest path where each step moves to an adjacent cell (up, down, left, right — no diagonals) and each value is strictly greater than the previous.
example:
Input:
A = [9 9 4;
6 6 8;
2 1 1]
Output: 4

Solution Stats

11 Solutions

9 Solvers

Last Solution submitted on Aug 13, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers9

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!