![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
哈哈哈哈哈你傻
这个作者很懒,什么都没留下…
展开
-
LeetCode题解:Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node. If there is原创 2017-05-26 10:41:55 · 178 阅读 · 0 评论 -
LeetCode | Unique Binary Search Trees II
题目Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1…n.For example, Given n = 3, your program should return all 5 unique BST’s shown below. 1原创 2017-06-07 16:16:43 · 170 阅读 · 0 评论 -
Leetcode:Construct Binary Tree from Inorder and Postorder Traversal
题目Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 思路后序遍历中,最后一个节点是根节点,在中序遍历中根节点的左边是左子树,右边是右子树。实现上采用递归的方式。代码/**原创 2017-06-09 16:50:28 · 158 阅读 · 0 评论