LeetCode257——二叉樹的所有路徑

我的LeetCode代碼倉:https://github.com/617076674/LeetCode 原題鏈接:https://leetcode-cn.com/problems/binary-tree-paths/description/ 題目描述: 知識點:樹、深度優先遍歷、遞歸 思路:利用遞歸實現二叉樹的深度優先遍歷 遞歸出口: (1)如果root爲null,說明這是一棵空樹,直接返回一個空
相關文章
相關標籤/搜索