上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 题目: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3  阅读全文
posted @ 2017-07-24 17:42 荒野第一快递员 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solution 阅读全文
posted @ 2017-07-24 16:45 荒野第一快递员 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to it 阅读全文
posted @ 2017-07-24 14:33 荒野第一快递员 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 题意及分析:给出一棵树,要求给出这棵树的先序遍历组成的链表,但是 阅读全文
posted @ 2017-07-24 10:03 荒野第一快递员 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and 阅读全文
posted @ 2017-07-21 10:29 荒野第一快递员 阅读(176) 评论(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 su 阅读全文
posted @ 2017-07-21 09:26 荒野第一快递员 阅读(207) 评论(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 neare 阅读全文
posted @ 2017-07-19 22:14 荒野第一快递员 阅读(186) 评论(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 阅读全文
posted @ 2017-07-19 21:54 荒野第一快递员 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题意及分析:给出一个有序序列,构造一棵平衡二叉查找树。二叉查找树:对于任意一个节点,都有左子节点小 阅读全文
posted @ 2017-07-19 20:28 荒野第一快递员 阅读(166) 评论(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). 阅读全文
posted @ 2017-07-18 16:06 荒野第一快递员 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页