发表评论取消回复
相关阅读
相关 257 Binary Tree Paths
/ Definition for a binary tree node. public class TreeNode { int val; TreeNode l
相关 leetcode 257. Binary Tree Paths
Given a binary tree, return all root-to-leaf paths. For example, given the following bi
相关 [leetcode]: 257. Binary Tree Paths
1.题目 Given a binary tree, return all root-to-leaf paths. For example, given the fol
相关 leetcode 257. Binary Tree Paths 深度优先遍历DFS
Given a binary tree, return all root-to-leaf paths. For example, given the following bi
相关 leetcode 113. Path Sum II DFS深度优先遍历
Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals
相关 leetcode 112. Path Sum DFS深度优先遍历
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that a
相关 leetcode 101. Symmetric Tree BFS广度优先遍历+DFS深度优先遍历
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its ce
相关 leetcode 606. Construct String from Binary Tree 前序遍历 + 深度优先遍历DFS
You need to construct a string consists of parenthesis and integers from a binary tree w
相关 leetcode 257 Binary Tree Paths
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no chil
相关 leetcode 257. Binary Tree Paths
自己写的一个代码,注意这里判断是否是根节点前,应该把当前节点的value值push\_back到res中 / Definition for a bi
还没有评论,来说两句吧...