Day11 Path Sum II

LeetCode 113.  Path Sum II Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. 意思是找出从根结点到某叶结点的和等于sum,并记录这些路径在数组里。 我的思路是,利用栈来深度优先遍历二叉树,将这个遍历路径记录在一个数组t
相关文章
相关标签/搜索