摘要:
题目: 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 阅读全文
摘要:
题目: 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 阅读全文
摘要:
题目: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to it 阅读全文
摘要:
题目: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: 题意及分析:给出一棵树,要求给出这棵树的先序遍历组成的链表,但是 阅读全文