Leetcode 题解 - 树
摘要:1. 题目 437 统计路径和等于一个数的路径数量 1 public int pathSum(TreeNode root, int targetSum) { 2 if(root == null) return 0; 3 int res=0; 4 //分别记录从根节点开始 和从左右子结点开始的路径 5
阅读全文
posted @ 2022-05-31 22:27
posted @ 2022-05-31 22:27
posted @ 2022-05-31 09:44