Given N - Ary tree
Node * root = new Node ( 1 ) ; ( root -> child ) . push_back ( new Node ( 2 ) ) ; ( root -> child ) . push_back ( new Node ( 3 ) ) ; ( root -> child [ 0 ] -> child ) . push_back ( new Node ( 4 ) ) ; ( root -> child [ 1 ] -> child ) . push_back ( new Node ( 5 ) ) ; ( root -> child [ 1 ] -> child ) . push_back ( new Node ( 6 ) ) ; ( root -> child [ 1 ] -> child [ 1 ] -> child ) . push_back ( new Node ( 7 ) ) ; ( root -> child [ 1 ] -> child [ 1 ] -> child ) . push_back ( new Node ( 8 ) ) ;