Find the longest constrained path in a grid of positive integers.
Unlock detailed company stats for this questionUpgrade
Given an m x n grid of positive integers, you can start from any cell and move up, down, left or right, without revisiting cells. From A to B requires grid[B] <= A; from B to C requires grid[C] <= B or grid[C] <= A. Find the longest path. Likely needs DFS or backtracking, state tracking and memoization.
Format · Hard DSA round.
Community answers
No answers contributed by the community yet.


