BlooooooG


  • Home

  • Categories

  • Archives

  • Tags

  • Search

LeetCode Problem 107-Binary Tree Level Order Traversal II

Posted on 2019-05-22 | In LeetCode | Visitors

二叉树的层次遍历 II。给定一个二叉树,返回其节点值自底向上的层次遍历。 (即按从叶子节点所在层到根节点所在的层,逐层从左向右遍历)

Read more »

LeetCode Problem 106-Construct Binary Tree from Inorder and Postorder Traversal

Posted on 2019-05-22 | In LeetCode | Visitors

从中序与后序遍历序列构造二叉树。根据一棵树的中序遍历与后序遍历构造二叉树。

Read more »

LeetCode Problem 105-Construct Binary Tree from Preorder and Inorder Traversal

Posted on 2019-05-22 | In LeetCode | Visitors

从前序与中序遍历序列构造二叉树。根据一棵树的前序遍历与中序遍历构造二叉树。

Read more »

LeetCode Problem 104-Maximum Depth of Binary Tree

Posted on 2019-05-21 | In LeetCode | Visitors

二叉树的最大深度。给定一个二叉树,找出其最大深度。

二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。

Read more »

LeetCode Problem 103-Binary Tree Zigzag Level Order Traversal

Posted on 2019-05-21 | In LeetCode | Visitors

二叉树的锯齿形层次遍历。给定一个二叉树,返回其节点值的锯齿形层次遍历。(即先从左往右,再从右往左进行下一层遍历,以此类推,层与层之间交替进行)。

Read more »

LeetCode Problem 102-Binary Tree Level Order Traversal

Posted on 2019-05-18 | In LeetCode | Visitors

二叉树的层次遍历。给定一个二叉树,返回其按层次遍历的节点值。 (即逐层地,从左到右访问所有节点)。

例如: 给定二叉树: [3,9,20,null,null,15,7],

Read more »

LeetCode Problem 99-Recover Binary Search Tree

Posted on 2019-05-15 | In LeetCode | Visitors

恢复二叉搜索树。二叉搜索树中的两个节点被错误地交换。

请在不改变其结构的情况下,恢复这棵树。

Read more »

LeetCode Problem 101-Symmetric Tree

Posted on 2019-05-15 | In LeetCode | Visitors

对称二叉树。给定一个二叉树,检查它是否是镜像对称的。

例如,二叉树 [1,2,2,3,4,4,3] 是对称的。

Read more »

LeetCode Problem 100-Same Tree

Posted on 2019-05-15 | In LeetCode | Visitors

相同的树。给定两个二叉树,编写一个函数来检验它们是否相同。

如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。

Read more »

LeetCode Problem 98-Validate Binary Search Tree

Posted on 2019-05-14 | In LeetCode | Visitors

验证二叉搜索树。给定一个二叉树,判断其是否是一个有效的二叉搜索树。

假设一个二叉搜索树具有如下特征:

  • 节点的左子树只包含小于当前节点的数。
  • 节点的右子树只包含大于当前节点的数。
  • 所有左子树和右子树自身必须也是二叉搜索树。
Read more »
1 2 3 … 14
Wendell Gu

Wendell Gu

138 posts
4 categories
68 tags
GitHub
© 2021 Wendell Gu
Powered by Jekyll
Theme - NexT.Mist
Storage Service - UPYUN