Friday, October 17, 2014

Flatten Binary Tree to Linked List

Problem

Given a binary tree, flatten it to a linked list in-place.

For example,
Given
The flattened tree should look like:

Idea

二叉树的先根遍历

Solution


No comments:

Post a Comment