LeetCode257——二叉树的所有路径

我的LeetCode代码仓:https://github.com/617076674/LeetCode 原题链接:https://leetcode-cn.com/problems/binary-tree-paths/description/ 题目描述: 知识点:树、深度优先遍历、递归 思路:利用递归实现二叉树的深度优先遍历 递归出口: (1)如果root为null,说明这是一棵空树,直接返回一个空
相关文章
相关标签/搜索