上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页
摘要: 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 whic 阅读全文
posted @ 2017-11-20 05:06 逸朵 阅读(131) 评论(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 sti 阅读全文
posted @ 2017-11-20 03:35 逸朵 阅读(124) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its ne 阅读全文
posted @ 2017-11-20 02:53 逸朵 阅读(124) 评论(0) 推荐(0)
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. Given inorde 阅读全文
posted @ 2017-11-20 02:41 逸朵 阅读(150) 评论(0) 推荐(0)
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 阅读全文
posted @ 2017-11-20 02:32 逸朵 阅读(95) 评论(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 sum 阅读全文
posted @ 2017-11-18 05:27 逸朵 阅读(131) 评论(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-11-18 05:18 逸朵 阅读(136) 评论(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-11-18 05:04 逸朵 阅读(151) 评论(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-11-18 03:34 逸朵 阅读(143) 评论(0) 推荐(0)
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
posted @ 2017-11-18 01:23 逸朵 阅读(125) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页