// 继续遍历左右节点 // 这里new path是因为左右都会在下次递归path.add(root.val); this.find(root.left, target, result, new ArrayList<>(path)); this.find(root.right, target, result, new ArrayList<>(path)); 请问这里在传递path的时候,为什么要new一下呢
点赞

相关推荐

2025-12-15 14:25
云南大学 Java
lei22:入职可能会看学信网,最好别伪装,这个简历找实习肯定是够的,肯定会有收 28 届实习生的公司的,多投就行
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务