This article was reproduced from: http://www.cnblogs.com/zhuyf87/archive/2012/11/04/2753950.html
The tree is converted to a two-fork tree
(1) Add line. Add an attachment between all the sibling nodes.
(2) Go to line. Each node in the tree retains its connection to the first child's node, removing its connection to the other child's nodes.
(3) Level adjustment. Take the root node of the tree as the axis, the whole tree clockwise rotation of a certain angle, so that the structure of a clear hierarchy. (Note that the first child is the left child of the knot, and the child converted by the brother is the right child of the knot.)
Forest converted to two-fork tree
(1) Convert each tree to a two-fork tree.
(2) The first binary tree does not move, starting from the second binary tree, in turn the root node of the second fork tree as the root node of the previous binary tree, the right child, connected with the line.
Binary tree converted to tree
is the inverse process of a tree converted to a two-fork tree.
(1) Add line. If a node x's left child node exists, then the left child's right child node, right child's right child node, right child's right child's right child knot point, all as Node x child. Connect the node x to these right child nodes using a line.
(2) Go to line. Delete all nodes in the original binary tree and their right child nodes.
(3) Level adjustment.
Binary tree converted to forest
If the root node of a binary tree has a right child, the binary tree can be converted into a forest, otherwise it will be converted to a tree.
(1) Starting from the root node, if the right child exists, then the link with the right child node is removed. Then look at the detached two-fork tree, if the right child of the root node exists, then the connection is deleted .... Until all of these root nodes are removed from the right child's connection.
(2) Convert each separated two-fork tree into a tree.
Reference:
[1] "Big talk data Structure"
[Reproduced] tree, forest and two-fork tree conversion