摘要: 深度优先搜索 class Solution { public int pathSum(TreeNode root, int targetSum) { /** * 空节点返回0 */ if (root == null){ return 0; } /** * 分两种情况:路径包含该节点和不包含 * 两种 阅读全文
posted @ 2021-12-26 14:05 振袖秋枫问红叶 阅读(27) 评论(0) 推荐(0)