上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 48 下一页
摘要: Find the sum of all left leaves in a given binary tree. Example: 方法二: 阅读全文
posted @ 2017-10-21 23:09 daniel456 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:54 daniel456 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:50 daniel456 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:37 daniel456 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:33 daniel456 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:29 daniel456 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 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 l 阅读全文
posted @ 2017-10-21 22:26 daniel456 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 22:18 daniel456 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题目含义:给定了一个升序的数组,转换成一个平衡二叉树 阅读全文
posted @ 2017-10-21 17:46 daniel456 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-21 17:43 daniel456 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 48 下一页