Sara

  • Home

  • Tags

  • Categories

  • Archives

  • Search

LeetCode_Path Sum II

Posted on 2019-03-05 | In LeetCode

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. Note: A leaf is a node with no children.
(二叉树路径和并返回相应路径)

Read more »

LeetCode_Path Sum

Posted on 2019-03-05 | In LeetCode

Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children.
(二叉树路径和)

Read more »

LeetCode_Minimum Depth of Binary Tree

Posted on 2019-03-05 | In LeetCode

Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a node with no children.
(二叉树的最低深度)

Read more »

LeetCode_Balanced Binary Tree

Posted on 2019-03-04 | In LeetCode

Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
(判断是否是平衡二叉树)

Read more »

LeetCode_Convert Sorted List to Binary Search Tree

Posted on 2019-03-04 | In LeetCode

Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
(将有序链表转换为平衡二叉树)

Read more »

LeetCode_Convert Sorted Array to Binary Search Tree

Posted on 2019-03-04 | In LeetCode

Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
(将有序数组转换为平衡二叉树)

Read more »

LeetCode_Binary Tree Level Order Traversal II

Posted on 2019-03-04 | In LeetCode

Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).
(从底向上按层遍历二叉树)

Read more »

LeetCode_Construct Binary Tree from Inorder and Postorder Traversal

Posted on 2019-03-04 | In LeetCode

Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.
(根据中序遍历和后序遍历构建二叉树)

Read more »

LeetCode_Construct Binary Tree from Preorder and Inorder Traversal

Posted on 2019-03-04 | In LeetCode

Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree.
(根据先序遍历和中序遍历构建二叉树)

Read more »

LeetCode_Maximum Depth of Binary Tree

Posted on 2019-03-04 | In LeetCode

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 leaf node.
(二叉树的深度)

Read more »
1…91011…21

Sara Han

207 posts
4 categories
40 tags
© 2019 Sara Han
Powered by Hexo v3.8.0
|
Theme – NexT.Mist v6.4.2