Let us create binary tree given in the above example
Node * root = newNode ( 1 ) ; root -> left = newNode ( 2 ) ; root -> right = newNode ( 3 ) ; root -> left -> left = newNode ( 4 ) ; root -> left -> right = newNode ( 5 ) ; root -> right -> left = newNode ( 6 ) ; root -> right -> right = newNode ( 7 ) ; root -> left -> left -> left = newNode ( 8 ) ; root -> right -> left -> left = newNode ( 9 ) ; root -> right -> left -> right = newNode ( 10 ) ; int turn = 0 ; if ( ( turn = NumberOFTurn ( root , 5 , 10 ) ) ) cout << turn << endl ; else cout << " Not ▁ Possible " << endl ; return 0 ; }