Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1 | 1 |
The flattened tree should look like:
1 | 1 |
二叉树转链表
1 | /** |
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1 | 1 |
The flattened tree should look like:
1 | 1 |
二叉树转链表
1 | /** |