Left-Child Right-Sibling Representation is a different representation of an n-ary tree where instead of holding a reference to each and every child node, a node holds just two references, first a reference to its first child, and the other to its immediate next sibling. This new transformation not only removes the need for advanced knowledge of the number of children a node has but also limits the number of references to a maximum of two, thereby making it so much easier to code.
At each node, link children of same parent from left to right.
Parent should be linked with only first child
Left Child Right Sibling tree representation 10
|
2 -> 3 -> 4 -> 5
| |
6 7 -> 8 -> 9