Push the child nodes of temp into the queue
q . push ( temp -> child [ i ] ) ; } } if ( flag == 0 ) cout << " No ▁ siblings ! ! " ; } Node * constructTree ( ) { Node * root = newNode ( 10 ) ; ( root -> child ) . push_back ( newNode ( 20 ) ) ; ( root -> child ) . push_back ( newNode ( 30 ) ) ; ( root -> child ) . push_back ( newNode ( 40 ) ) ; ( root -> child [ 0 ] -> child ) . push_back ( newNode ( 50 ) ) ; ( root -> child [ 0 ] -> child ) . push_back ( newNode ( 60 ) ) ; ( root -> child [ 1 ] -> child ) . push_back ( newNode ( 70 ) ) ; ( root -> child [ 1 ] -> child ) . push_back ( newNode ( 80 ) ) ; ( root -> child [ 2 ] -> child ) . push_back ( newNode ( 90 ) ) ; ( root -> child [ 2 ] -> child ) . push_back ( newNode ( 100 ) ) ; ( root -> child [ 2 ] -> child ) . push_back ( newNode ( 110 ) ) ; return root ; }