can you please send me how to take input using level order traversal.
I have figured out leaf node condn
void leafnode(node*root){
if(root==NULL) return;
if(root->left==NULL && root->right==NULL){
cout<<root->data<<" ";
}
if(root->left)
leafnode(root->left);
if(root->right)
leafnode(root->right);
}