
Desicription
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 |
Solution
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 |
|
近期评论