上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 49 下一页
摘要: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. 题目含义:用中序遍历树并输出 阅读全文
posted @ 2017-10-23 11:20 daniel456 阅读(121) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth 阅读全文
posted @ 2017-10-23 11:19 daniel456 阅读(144) 评论(0) 推荐(0)
摘要: Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: Construct the maximum tree by the given array a 阅读全文
posted @ 2017-10-23 11:13 daniel456 阅读(122) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2017-10-23 11:05 daniel456 阅读(93) 评论(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-10-23 11:02 daniel456 阅读(109) 评论(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-10-23 11:00 daniel456 阅读(98) 评论(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-10-23 10:53 daniel456 阅读(112) 评论(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-10-23 10:46 daniel456 阅读(101) 评论(0) 推荐(0)
摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2017-10-23 10:34 daniel456 阅读(132) 评论(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-10-23 10:26 daniel456 阅读(104) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 49 下一页