Generic_tree_input

can u explain input format of generic tree.
sample input:-
1 2
2 2
3 0
4 0
5 2
6 0
7 0
2

‘1’ has two child
first child of ‘1’ is ‘2’ which has 2 child
first child of ‘2’ is 3 which has no child
second child of ‘2’ is 4 which has no child
second child of ‘1’ is ‘5’ which has 2 child
first child of ‘5’ is 6 which has no child
second child of ‘5’ is 7 which has no child

1 Like