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. F ...
分类:
其他好文 时间:
2017-10-22 00:26:54
阅读次数:
167
Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define ...
分类:
其他好文 时间:
2017-10-22 00:25:44
阅读次数:
133
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee ...
分类:
其他好文 时间:
2017-10-22 00:19:56
阅读次数:
225
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 dept ...
分类:
其他好文 时间:
2017-10-22 00:15:49
阅读次数:
175
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题目含义:给定了一个升序的数组,转换成一个平衡二叉树 ...
分类:
其他好文 时间:
2017-10-21 19:19:54
阅读次数:
246
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 l ...
分类:
其他好文 时间:
2017-10-21 19:02:59
阅读次数:
194
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t ...
分类:
其他好文 时间:
2017-10-21 19:00:02
阅读次数:
178
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). For ...
分类:
其他好文 时间:
2017-10-21 18:59:16
阅读次数:
109
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 a ...
分类:
其他好文 时间:
2017-10-21 18:56:03
阅读次数:
143
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all ...
分类:
其他好文 时间:
2017-10-20 18:27:38
阅读次数:
234