上一页 1 ··· 15 16 17 18 19
摘要: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, Return6. 阅读全文
posted @ 2017-06-10 21:03 王大咩的图书馆 阅读(296) 评论(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-06-10 16:46 王大咩的图书馆 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-06-10 15:35 王大咩的图书馆 阅读(353) 评论(1) 推荐(0) 编辑
摘要: Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number. An example is the root-to-leaf path1->2->3which re 阅读全文
posted @ 2017-06-09 22:25 王大咩的图书馆 阅读(540) 评论(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-06-09 09:29 王大咩的图书馆 阅读(581) 评论(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. 利用中序和后序遍历构造 阅读全文
posted @ 2017-06-08 16:54 王大咩的图书馆 阅读(414) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2017-06-08 15:26 王大咩的图书馆 阅读(393) 评论(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-06-08 14:29 王大咩的图书馆 阅读(1986) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree{3, 阅读全文
posted @ 2017-06-08 11:07 王大咩的图书馆 阅读(1835) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree{1,#,2,3}, return[3,2,1]. Note: Recursive solut 阅读全文
posted @ 2017-06-08 09:14 王大咩的图书馆 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree{1,#,2,3}, return[1,3,2]. Note: Recursive solutio 阅读全文
posted @ 2017-06-07 17:06 王大咩的图书馆 阅读(503) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree{1,#,2,3}, return[1,2,3]. Note: Recursive soluti 阅读全文
posted @ 2017-06-07 15:41 王大咩的图书馆 阅读(947) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19