construct a tree
Node * root = newNode ( 1 ) ; root -> left = newNode ( 2 ) ; root -> right = newNode ( 3 ) ; root -> left -> right = newNode ( 4 ) ; root -> right -> left = newNode ( 5 ) ; root -> right -> right = newNode ( 6 ) ; int result = checkLevelLeafNode ( root ) ; if ( result ) cout << " All ▁ leaf ▁ nodes ▁ are ▁ at ▁ same ▁ level STRNEWLINE " ; else cout << " Leaf ▁ nodes ▁ not ▁ at ▁ same ▁ level STRNEWLINE " ; return 0 ; }