摘要: 深度优先搜索,思路不难,其中重要的是记忆化搜索,就是搜索的时候记录以当前节点为起点的最长路径的长度。贴代码 1 class Solution { 2 public: 3 int res = 0; 4 int m; 5 int n; 6 int longestIncreasingPath(vector 阅读全文
posted @ 2021-11-15 22:20 zhaohhhh 阅读(36) 评论(0) 推荐(0)