Longest Increasing Path in a Matrix dp[i][j] 代表的是以i,j爲index的cell,最長的升序長度是多少。然後每個點做dfs,判斷四個方向的來的最大值;Time O(M*N) Space: O(M*n);
Longest Increasing Path in a Matrix dp[i][j] 代表的是以i,j爲index的cell,最長的升序長度是多少。然後每個點做dfs,判斷四個方向的來的最大值;Time O(M*N) Space: O(M*n);