[LeetCode] Add One Row to Tree 二叉树中增加一行

 Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given dep
7次阅读

binary-tree-inorder-traversal——二叉树中序遍历

Given a binary tree, return the inordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3 return
3次阅读

same-tree——比较两个二叉树是否相同

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an
5次阅读

leetcode-Symmetric Tree 对称树

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric:1 / \ 2
3次阅读

binary-tree-zigzag-level-order-traversal——二叉树分层输出

Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next
4次阅读

maximum-depth-of-binary-tree——找出数的最大深度

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le
0次阅读

construct-binary-tree-from-preorder-and-inorder-traversal——前序和中序求二叉树

Given preorder and inorder traversal of a tree, construct the binary tree.Note:  You may assume that duplicates do not exist in the tree. 1
4次阅读

binary-tree-level-order-traversal I、II——输出二叉树的数字序列

IGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given bina
5次阅读

binary-tree-maximum-path-sum——二叉树任意一条路径上的最大值

Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1
2次阅读

binary-tree-preorder-traversal——前序遍历

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3 
9次阅读