Skip to content

Latest commit

 

History

History
 
 

329.Longest-Increasing-Path-in-a-Matrix

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

329.Longest-Increasing-Path-in-a-Matrix

我们从任意点A开始递归寻找各条递增路径,最终返回的时候记录从A为起点时的最长路径长度。将此结果记忆化,这样当对其他点进行DFS的时候,如果递归调用到dfs(A)就直接返回结果。