随笔分类 -  典型算法题-dfs

摘要:给定一棵二叉树,求其最长连续数字路径(指的是形如x , x + 1 , x + 2 , . . . , x + k x,x+1,x+2,...,x+kx,x+1,x+2,...,x+k的路径)的长度。路径可以由任一点出发,任一点结束。 public class ShowMeBug { public 阅读全文
posted @ 2024-01-17 21:01 guoyu1 阅读(2) 评论(0) 推荐(0) 编辑
摘要:1、代码: https://leetcode-cn.com/problems/permutations-ii/submissions/ class Solution { public List<List<Integer>> permuteUnique(int[] nums) { ArrayList< 阅读全文
posted @ 2021-10-06 15:21 guoyu1 阅读(17) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示