码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
563. Binary Tree Tilt
Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt ...
分类:其他好文   时间:2017-10-22 21:46:34    阅读次数:165
669. Trim a Binary Search Tree
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might ...
分类:其他好文   时间:2017-10-22 21:42:12    阅读次数:103
637. Average of Levels in Binary Tree
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: ...
分类:其他好文   时间:2017-10-22 21:27:55    阅读次数:91
687. Longest Univalue Path
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo ...
分类:其他好文   时间:2017-10-22 21:20:42    阅读次数:101
572. Subtree of Another Tree
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a ...
分类:其他好文   时间:2017-10-22 21:16:30    阅读次数:150
653. Two Sum IV - Input is a BST
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E ...
分类:其他好文   时间:2017-10-22 20:57:06    阅读次数:124
lintcode69- Binary Tree Level Order Traversal- easy
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree {3,9,2 ...
分类:其他好文   时间:2017-10-22 11:11:41    阅读次数:129
404. Sum of Left Leaves
Find the sum of all left leaves in a given binary tree. Example: 方法二: ...
分类:其他好文   时间:2017-10-22 01:40:25    阅读次数:164
538. Convert BST to Greater Tree
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-22 00:34:43    阅读次数:118
235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:其他好文   时间:2017-10-22 00:32:00    阅读次数:143
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!